From 354da975a9fc4addfa2cba9cd1cef8e633b0afbc Mon Sep 17 00:00:00 2001 From: Sean Collings Date: Mon, 7 Apr 2025 16:46:45 -0600 Subject: [PATCH 1/5] canvas-api-client package --- package-lock.json | 487 +- package.json | 3 +- packages/canvas-api-client/README.md | 13 + packages/canvas-api-client/docs/Index.mdx | 5 + .../canvas-api-client/openapi-ts.config.ts | 8 + packages/canvas-api-client/package.json | 27 + .../src/generated/client.gen.ts | 18 + .../canvas-api-client/src/generated/index.ts | 3 + .../src/generated/sdk.gen.ts | 16219 ++++++++ .../src/generated/types.gen.ts | 33528 ++++++++++++++++ packages/canvas-api-client/src/index.ts | 0 .../canvas-api-client/tsconfig.build.json | 8 + packages/canvas-api-client/vitest.config.ts | 9 + packages/canvas-api-client/vitest.setup.ts | 5 + 14 files changed, 50331 insertions(+), 2 deletions(-) create mode 100644 packages/canvas-api-client/README.md create mode 100644 packages/canvas-api-client/docs/Index.mdx create mode 100644 packages/canvas-api-client/openapi-ts.config.ts create mode 100644 packages/canvas-api-client/package.json create mode 100644 packages/canvas-api-client/src/generated/client.gen.ts create mode 100644 packages/canvas-api-client/src/generated/index.ts create mode 100644 packages/canvas-api-client/src/generated/sdk.gen.ts create mode 100644 packages/canvas-api-client/src/generated/types.gen.ts create mode 100644 packages/canvas-api-client/src/index.ts create mode 100644 packages/canvas-api-client/tsconfig.build.json create mode 100644 packages/canvas-api-client/vitest.config.ts create mode 100644 packages/canvas-api-client/vitest.setup.ts diff --git a/package-lock.json b/package-lock.json index 17537f32..d49e2148 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,8 @@ "packages/lti-client", "packages/lti-server", "packages/lti-components", - "packages/canvas-client" + "packages/canvas-client", + "packages/canvas-api-client" ], "dependencies": { "@changesets/cli": "^2.27.10", @@ -371,6 +372,10 @@ "resolved": "packages/atomic-fuel", "link": true }, + "node_modules/@atomicjolt/canvas-api-client": { + "resolved": "packages/canvas-api-client", + "link": true + }, "node_modules/@atomicjolt/canvas-client": { "resolved": "packages/canvas-client", "link": true @@ -5329,6 +5334,92 @@ "@hapi/hoek": "^9.0.0" } }, + "node_modules/@hey-api/client-fetch": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@hey-api/client-fetch/-/client-fetch-0.10.0.tgz", + "integrity": "sha512-C7vzj4t52qPiHCqjn1l8cRTI2p4pZCd7ViLtJDTHr5ZwI4sWOYC1tmv6bd529qqY6HFFbhGCz4TAZSwKAMJncg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/hey-api" + }, + "peerDependencies": { + "@hey-api/openapi-ts": "< 2" + } + }, + "node_modules/@hey-api/json-schema-ref-parser": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@hey-api/json-schema-ref-parser/-/json-schema-ref-parser-1.0.4.tgz", + "integrity": "sha512-IaJ4yFgU5r63KZyeySHRKSM1bavFIda8KdwCFi5BxQCIklltzEByBksNOPms+yHXpWWfR+OopIusVZV8roycYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/hey-api" + } + }, + "node_modules/@hey-api/json-schema-ref-parser/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/@hey-api/json-schema-ref-parser/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@hey-api/openapi-ts": { + "version": "0.66.3", + "resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.66.3.tgz", + "integrity": "sha512-kws5hZo/M5WuapSYVvA7Nr+/4bCCjzDEzdjxUqWH8VV28MG7nob+TwZRgqaus7POZmJ2+zc2oCzHhdlvOTYVLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@hey-api/json-schema-ref-parser": "1.0.4", + "c12": "2.0.1", + "commander": "13.0.0", + "handlebars": "4.7.8" + }, + "bin": { + "openapi-ts": "bin/index.cjs" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=22.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/hey-api" + }, + "peerDependencies": { + "typescript": "^5.5.3" + } + }, + "node_modules/@hey-api/openapi-ts/node_modules/commander": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.0.0.tgz", + "integrity": "sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", @@ -5596,6 +5687,13 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true, + "license": "MIT" + }, "node_modules/@leichtgewicht/ip-codec": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", @@ -10990,6 +11088,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/axios": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", + "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/babel-loader": { "version": "9.2.1", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.2.1.tgz", @@ -11290,6 +11399,108 @@ "node": ">= 0.8" } }, + "node_modules/c12": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/c12/-/c12-2.0.1.tgz", + "integrity": "sha512-Z4JgsKXHG37C6PYUtIxCfLJZvo6FyhHJoClwwb9ftUkLpPSkuYqn6Tr+vnaN8hymm0kIbcg6Ey3kv/Q71k5w/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.1", + "confbox": "^0.1.7", + "defu": "^6.1.4", + "dotenv": "^16.4.5", + "giget": "^1.2.3", + "jiti": "^2.3.0", + "mlly": "^1.7.1", + "ohash": "^1.1.4", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.2.0", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.5" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, + "node_modules/c12/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/c12/node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/c12/node_modules/jiti": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/c12/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/c12/node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, + "node_modules/c12/node_modules/pkg-types/node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/c12/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -11613,6 +11824,16 @@ "fsevents": "~2.3.2" } }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/chrome-trace-event": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", @@ -11637,6 +11858,16 @@ "node": ">=8" } }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "consola": "^3.2.3" + } + }, "node_modules/classnames": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", @@ -12930,6 +13161,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "dev": true, + "license": "MIT" + }, "node_modules/del": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", @@ -12979,6 +13217,13 @@ "node": ">=6" } }, + "node_modules/destr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", + "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", + "dev": true, + "license": "MIT" + }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -13237,6 +13482,19 @@ "node": ">=8" } }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -15046,6 +15304,39 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-minipass/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, "node_modules/fs-monkey": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.6.tgz", @@ -15301,6 +15592,25 @@ "node": ">= 10.0.0" } }, + "node_modules/giget": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/giget/-/giget-1.2.5.tgz", + "integrity": "sha512-r1ekGw/Bgpi3HLV3h1MRBIlSAdHoIMklpaQ3OQLFcRw9PwAj2rqigvIbg+dBUI51OxVI2jsEtDywDBjSiuf7Ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.6", + "nypm": "^0.5.4", + "pathe": "^2.0.3", + "tar": "^6.2.1" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, "node_modules/github-slugger": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.5.0.tgz", @@ -20265,6 +20575,53 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/mlly": { "version": "1.7.4", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz", @@ -20425,6 +20782,13 @@ "node": ">=18" } }, + "node_modules/node-fetch-native": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.6.tgz", + "integrity": "sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==", + "dev": true, + "license": "MIT" + }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -20799,6 +21163,46 @@ "integrity": "sha512-p1TRH/edngVEHVbwqWnxUViEmq5znDvyB+Sik5cmuLpGOIfDf/39zLiq3swPF8Vakqn+gvNiOQAZu8djYlQILA==", "license": "MIT" }, + "node_modules/nypm": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.5.4.tgz", + "integrity": "sha512-X0SNNrZiGU8/e/zAB7sCTtdxWTMSIO73q+xuKgglm2Yvzwlo8UoC5FNySQFCvl84uPaeADkqHUZUkWy4aH4xOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "tinyexec": "^0.3.2", + "ufo": "^1.5.4" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": "^14.16.0 || >=16.10.0" + } + }, + "node_modules/nypm/node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/nypm/node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -20855,6 +21259,13 @@ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", "license": "MIT" }, + "node_modules/ohash": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-1.1.6.tgz", + "integrity": "sha512-TBu7PtV8YkAZn0tSxobKY2n2aAQva936lhRrj6957aDaCf9IEtqsKbgMzXE/F/sjqYOwmrukeORHNLe5glk7Cg==", + "dev": true, + "license": "MIT" + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -21332,6 +21743,13 @@ "node": ">= 14.16" } }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -23223,6 +23641,12 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -23385,6 +23809,17 @@ "node": ">=0.10.0" } }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, "node_modules/react": { "version": "19.0.0", "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", @@ -26277,6 +26712,41 @@ "node": ">=6" } }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dev": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, "node_modules/term-size": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", @@ -28971,6 +29441,21 @@ "node": ">=14.18.0" } }, + "packages/canvas-api-client": { + "name": "@atomicjolt/canvas-api-client", + "version": "0.0.0", + "license": "MIT", + "dependencies": { + "axios": "^1.0.0" + }, + "devDependencies": { + "@hey-api/client-fetch": "^0.10.0", + "@hey-api/openapi-ts": "^0.66.3" + }, + "peerDependencies": { + "axios": "^1.0.0" + } + }, "packages/canvas-client": { "name": "@atomicjolt/canvas-client", "version": "0.0.0", diff --git a/package.json b/package.json index be107f18..a4bf4725 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "packages/lti-client", "packages/lti-server", "packages/lti-components", - "packages/canvas-client" + "packages/canvas-client", + "packages/canvas-api-client" ], "scripts": { "prepare": "npm run storybook:cssprops", diff --git a/packages/canvas-api-client/README.md b/packages/canvas-api-client/README.md new file mode 100644 index 00000000..95803e3b --- /dev/null +++ b/packages/canvas-api-client/README.md @@ -0,0 +1,13 @@ +# @atomicjolt/canvas-api-client + +A TypeScript client for the Canvas LMS API. + +## Development + +To regenerate the API client from the OpenAPI spec: + +```bash +npm run generate +``` + + diff --git a/packages/canvas-api-client/docs/Index.mdx b/packages/canvas-api-client/docs/Index.mdx new file mode 100644 index 00000000..4a9105c5 --- /dev/null +++ b/packages/canvas-api-client/docs/Index.mdx @@ -0,0 +1,5 @@ +--- +sidebar_position: 1 +--- + +# Introduction diff --git a/packages/canvas-api-client/openapi-ts.config.ts b/packages/canvas-api-client/openapi-ts.config.ts new file mode 100644 index 00000000..09b6a666 --- /dev/null +++ b/packages/canvas-api-client/openapi-ts.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from "@hey-api/openapi-ts"; + +export default defineConfig({ + input: + "https://gitlab.com/lauraschauer/canvas-openapi-specification/-/raw/main/openapi-specs/openapi3.yaml", + output: "./src/generated", + plugins: ["@hey-api/client-fetch"], +}); diff --git a/packages/canvas-api-client/package.json b/packages/canvas-api-client/package.json new file mode 100644 index 00000000..66d8fa4b --- /dev/null +++ b/packages/canvas-api-client/package.json @@ -0,0 +1,27 @@ +{ + "name": "@atomicjolt/canvas-api-client", + "version": "0.0.0", + "license": "MIT", + "type": "module", + "main": "dist/index.js", + "types": "dist/types/index.d.ts", + "files": [ + "dist" + ], + "scripts": { + "build": "tsc -p ./tsconfig.build.json", + "test": "vitest run", + "prepublishOnly": "npm run build", + "generate": "openapi-ts" + }, + "peerDependencies": { + "axios": "^1.0.0" + }, + "devDependencies": { + "@hey-api/client-fetch": "^0.10.0", + "@hey-api/openapi-ts": "^0.66.3" + }, + "dependencies": { + "axios": "^1.0.0" + } +} diff --git a/packages/canvas-api-client/src/generated/client.gen.ts b/packages/canvas-api-client/src/generated/client.gen.ts new file mode 100644 index 00000000..02e3db71 --- /dev/null +++ b/packages/canvas-api-client/src/generated/client.gen.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { ClientOptions } from './types.gen'; +import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from '@hey-api/client-fetch'; + +/** + * 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({ + baseUrl: 'https://gitlab.com' +})); \ No newline at end of file diff --git a/packages/canvas-api-client/src/generated/index.ts b/packages/canvas-api-client/src/generated/index.ts new file mode 100644 index 00000000..e64537d2 --- /dev/null +++ b/packages/canvas-api-client/src/generated/index.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; +export * from './sdk.gen'; \ No newline at end of file diff --git a/packages/canvas-api-client/src/generated/sdk.gen.ts b/packages/canvas-api-client/src/generated/sdk.gen.ts new file mode 100644 index 00000000..d6f2cb19 --- /dev/null +++ b/packages/canvas-api-client/src/generated/sdk.gen.ts @@ -0,0 +1,16219 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { type Options as ClientOptions, type TDataShape, type Client, urlSearchParamsBodySerializer } from '@hey-api/client-fetch'; +import type { GetSingleAssignmentLtiData, GetSingleAssignmentLtiResponse, ShowOriginalityReportFilesData, ShowOriginalityReportFilesResponse, EditOriginalityReportFilesData, EditOriginalityReportFilesResponse, GetSingleSubmissionData, GetHistoryOfSingleSubmissionData, CreateOriginalityReportData, CreateOriginalityReportResponse, ShowOriginalityReportSubmissionsData, ShowOriginalityReportSubmissionsResponse, EditOriginalityReportSubmissionsData, EditOriginalityReportSubmissionsResponse, GetAllUsersInGroupLtiData, GetAllUsersInGroupLtiResponse, ListAllWebhookSubscriptionForToolProxyData, CreateWebhookSubscriptionData, DeleteWebhookSubscriptionData, ShowSingleWebhookSubscriptionData, UpdateWebhookSubscriptionData, GetSingleUserLtiData, GetSingleUserLtiResponse, RetrieveAssignmentsEnabledForGradeExportToSisAccountsData, RetrieveAssignmentsEnabledForGradeExportToSisCoursesData, DisableAssignmentsCurrentlyEnabledForGradeExportToSisData, ListAccountsData, ListAccountsResponse, SearchAccountDomainsData, IndexOfActiveGlobalNotificationForUserData, IndexOfActiveGlobalNotificationForUserResponse, CreateGlobalNotificationData, CloseNotificationForUserData, CloseNotificationForUserResponse, ShowGlobalNotificationData, ShowGlobalNotificationResponse, UpdateGlobalNotificationData, ListAccountAdminsData, ListAccountAdminsResponse, MakeAccountAdminData, MakeAccountAdminResponse, RemoveAccountAdminData, RemoveAccountAdminResponse, GetDepartmentLevelParticipationDataCompletedData, GetDepartmentLevelGradeDataCompletedData, GetDepartmentLevelStatisticsCompletedData, GetDepartmentLevelParticipationDataCurrentData, GetDepartmentLevelGradeDataCurrentData, GetDepartmentLevelStatisticsCurrentData, GetDepartmentLevelParticipationDataTermsData, GetDepartmentLevelGradeDataTermsData, GetDepartmentLevelStatisticsTermsData, ListAuthenticationProvidersData, ListAuthenticationProvidersResponse, AddAuthenticationProviderData, AddAuthenticationProviderResponse, DeleteAuthenticationProviderData, GetAuthenticationProviderData, GetAuthenticationProviderResponse, UpdateAuthenticationProviderData, UpdateAuthenticationProviderResponse, ListContentMigrationsAccountsData, ListContentMigrationsAccountsResponse, CreateContentMigrationAccountsData, CreateContentMigrationAccountsResponse, ListMigrationSystemsAccountsData, ListMigrationSystemsAccountsResponse, ListMigrationIssuesAccountsData, ListMigrationIssuesAccountsResponse, GetMigrationIssueAccountsData, GetMigrationIssueAccountsResponse, UpdateMigrationIssueAccountsData, UpdateMigrationIssueAccountsResponse, GetContentMigrationAccountsData, GetContentMigrationAccountsResponse, UpdateContentMigrationAccountsData, UpdateContentMigrationAccountsResponse, CreateNewCourseData, CreateNewCourseResponse, UpdateCoursesData, UpdateCoursesResponse, GetSingleCourseAccountsData, GetSingleCourseAccountsResponse, CreateToolFromToolconfigurationAccountsData, CreateToolFromToolconfigurationAccountsResponse, EnrollmentByIdData, EnrollmentByIdResponse, ListExternalToolsAccountsData, CreateExternalToolAccountsData, GetSessionlessLaunchUrlForExternalToolAccountsData, DeleteExternalToolAccountsData, GetSingleExternalToolAccountsData, EditExternalToolAccountsData, ListFeaturesAccountsData, ListFeaturesAccountsResponse, ListEnabledFeaturesAccountsData, RemoveFeatureFlagAccountsData, RemoveFeatureFlagAccountsResponse, GetFeatureFlagAccountsData, GetFeatureFlagAccountsResponse, SetFeatureFlagAccountsData, SetFeatureFlagAccountsResponse, ListGradingPeriodsAccountsData, ListGradingPeriodsAccountsResponse, DeleteGradingPeriodAccountsData, ListGradingStandardsAvailableInContextAccountsData, ListGradingStandardsAvailableInContextAccountsResponse, CreateNewGradingStandardAccountsData, CreateNewGradingStandardAccountsResponse, GetSingleGradingStandardInContextAccountsData, GetSingleGradingStandardInContextAccountsResponse, ListGroupCategoriesForContextAccountsData, ListGroupCategoriesForContextAccountsResponse, CreateGroupCategoryAccountsData, CreateGroupCategoryAccountsResponse, ListGroupsAvailableInContextAccountsData, ListGroupsAvailableInContextAccountsResponse, GetHelpLinksData, GetHelpLinksResponse, ListUserLoginsAccountsData, CreateUserLoginData, EditUserLoginData, GetAllOutcomeLinksForContextAccountsData, GetAllOutcomeLinksForContextAccountsResponse, GetAllOutcomeGroupsForContextAccountsData, GetAllOutcomeGroupsForContextAccountsResponse, DeleteOutcomeGroupAccountsData, DeleteOutcomeGroupAccountsResponse, ShowOutcomeGroupAccountsData, ShowOutcomeGroupAccountsResponse, UpdateOutcomeGroupAccountsData, UpdateOutcomeGroupAccountsResponse, ImportOutcomeGroupAccountsData, ImportOutcomeGroupAccountsResponse, ListLinkedOutcomesAccountsData, ListLinkedOutcomesAccountsResponse, CreateLinkOutcomeAccountsData, CreateLinkOutcomeAccountsResponse, UnlinkOutcomeAccountsData, UnlinkOutcomeAccountsResponse, CreateLinkOutcomeAccountsOutcomeIdData, CreateLinkOutcomeAccountsOutcomeIdResponse, ListSubgroupsAccountsData, ListSubgroupsAccountsResponse, CreateSubgroupAccountsData, CreateSubgroupAccountsResponse, ImportOutcomesAccountsData, ImportOutcomesAccountsResponse, GetOutcomeImportStatusAccountsData, GetOutcomeImportStatusAccountsResponse, GetProficiencyRatingsData, GetProficiencyRatingsResponse, CreateUpdateProficiencyRatingsData, CreateUpdateProficiencyRatingsResponse, AccountPermissionsData, ListAvailableReportsData, IndexOfReportsData, IndexOfReportsResponse, StartReportData, StartReportResponse, DeleteReportData, DeleteReportResponse, StatusOfReportData, StatusOfReportResponse, ListRolesData, ListRolesResponse, CreateNewRoleData, CreateNewRoleResponse, DeactivateRoleData, DeactivateRoleResponse, GetSingleRoleData, GetSingleRoleResponse, UpdateRoleData, UpdateRoleResponse, ActivateRoleData, ActivateRoleResponse, RedirectToRootOutcomeGroupForContextAccountsData, ListRubricsAccountsData, ListRubricsAccountsResponse, GetSingleRubricAccountsData, GetSingleRubricAccountsResponse, ListScopesData, ListScopesResponse, SelfRegisterUserData, SelfRegisterUserResponse, ShareBrandconfigThemeData, ShareBrandconfigThemeResponse, UpdateSharedThemeData, UpdateSharedThemeResponse, GetSisImportErrorListSisImportErrorsData, GetSisImportErrorListSisImportErrorsResponse, GetSisImportListData, GetSisImportListResponse, ImportSisDataData, ImportSisDataResponse, AbortAllPendingSisImportsData, AbortAllPendingSisImportsResponse, GetSisImportStatusData, GetSisImportStatusResponse, AbortSisImportData, AbortSisImportResponse, GetSisImportErrorListSisImportsData, GetSisImportErrorListSisImportsResponse, RestoreWorkflowStatesOfSisImportedItemsData, RestoreWorkflowStatesOfSisImportedItemsResponse, ShowAccountAuthSettingsData, ShowAccountAuthSettingsResponse, UpdateAccountAuthSettingsData, UpdateAccountAuthSettingsResponse, GetSubAccountsOfAccountData, GetSubAccountsOfAccountResponse, CreateNewSubAccountData, CreateNewSubAccountResponse, DeleteSubAccountData, DeleteSubAccountResponse, ListEnrollmentTermsData, ListEnrollmentTermsResponse, CreateEnrollmentTermData, CreateEnrollmentTermResponse, DeleteEnrollmentTermData, DeleteEnrollmentTermResponse, UpdateEnrollmentTermData, UpdateEnrollmentTermResponse, GetTermsOfServiceData, GetTermsOfServiceResponse, ListUsersInAccountData, ListUsersInAccountResponse, CreateUserData, CreateUserResponse, DeleteUserFromRootAccountData, DeleteUserFromRootAccountResponse, GetSingleAccountData, GetSingleAccountResponse, UpdateAccountData, UpdateAccountResponse, ListAnnouncementsData, ListAnnouncementsResponse, ListAppointmentGroupsData, CreateAppointmentGroupData, GetNextAppointmentData, GetNextAppointmentResponse, DeleteAppointmentGroupData, GetSingleAppointmentGroupData, UpdateAppointmentGroupData, ListStudentGroupParticipantsData, ListUserParticipantsData, QueryByAccountData, QueryByLoginData, QueryByUserData, QueryByCourseData, QueryByCourseResponse, QueryByAssignmentData, QueryByAssignmentResponse, QueryByCourseGradeChangeData, QueryByCourseGradeChangeResponse, QueryByGraderData, QueryByGraderResponse, QueryByStudentData, QueryByStudentResponse, GetBrandConfigVariablesThatShouldBeUsedForThisDomainData, ListCalendarEventsData, ListCalendarEventsResponse, CreateCalendarEventData, DeleteCalendarEventData, GetSingleCalendarEventOrAssignmentData, GetSingleCalendarEventOrAssignmentResponse, UpdateCalendarEventData, ReserveTimeSlotData, ReserveTimeSlotParticipantIdData, ListMembersOfCollaborationData, ListMembersOfCollaborationResponse, ListOfCommmessagesForUserData, ListOfCommmessagesForUserResponse, ListConversationsData, ListConversationsResponse, CreateConversationData, BatchUpdateConversationsData, BatchUpdateConversationsResponse, GetRunningBatchesData, FindRecipientsConversationsData, MarkAllAsReadData, UnreadCountData, DeleteConversationData, GetSingleConversationData, EditConversationData, AddMessageData, AddRecipientsData, DeleteMessageData, ListAccountsForCourseAdminsData, ListAccountsForCourseAdminsResponse, ListYourCoursesData, ListYourCoursesResponse, CourseActivityStreamData, CourseActivityStreamSummaryData, GetCourseLevelParticipationDataData, GetCourseLevelAssignmentDataData, GetCourseLevelStudentSummaryDataData, GetUserInACourseLevelParticipationDataData, GetUserInACourseLevelAssignmentDataData, GetUserInACourseLevelAssignmentDataResponse, GetUserInACourseLevelMessagingDataData, ListAssignmentGroupsData, ListAssignmentGroupsResponse, CreateAssignmentGroupData, CreateAssignmentGroupResponse, DestroyAssignmentGroupData, DestroyAssignmentGroupResponse, GetAssignmentGroupData, GetAssignmentGroupResponse, EditAssignmentGroupData, EditAssignmentGroupResponse, ListAssignmentsData, ListAssignmentsResponse, CreateAssignmentData, CreateAssignmentResponse, ListMultipleAssignmentsGradeableStudentsData, BatchRetrieveOverridesInCourseData, BatchRetrieveOverridesInCourseResponse, BatchCreateOverridesInCourseData, BatchCreateOverridesInCourseResponse, BatchUpdateOverridesInCourseData, BatchUpdateOverridesInCourseResponse, ShowProvisionalGradeStatusForStudentAnonymousData, ListGradeableStudentsData, ListGradeableStudentsResponse, ListStudentsSelectedForModerationData, ListStudentsSelectedForModerationResponse, SelectStudentsForModerationData, SelectStudentsForModerationResponse, ListAssignmentOverridesData, ListAssignmentOverridesResponse, CreateAssignmentOverrideData, CreateAssignmentOverrideResponse, DeleteAssignmentOverrideData, DeleteAssignmentOverrideResponse, GetSingleAssignmentOverrideData, GetSingleAssignmentOverrideResponse, UpdateAssignmentOverrideData, UpdateAssignmentOverrideResponse, GetAllPeerReviewsCoursesPeerReviewsData, GetAllPeerReviewsCoursesPeerReviewsResponse, BulkSelectProvisionalGradesData, PublishProvisionalGradesForAssignmentData, ShowProvisionalGradeStatusForStudentData, CopyProvisionalGradeData, CopyProvisionalGradeResponse, SelectProvisionalGradeData, SubmissionSummaryCoursesData, ListAssignmentSubmissionsCoursesData, ListAssignmentSubmissionsCoursesResponse, SubmitAssignmentCoursesData, GradeOrCommentOnMultipleSubmissionsCoursesAssignmentsData, GradeOrCommentOnMultipleSubmissionsCoursesAssignmentsResponse, DeletePeerReviewCoursesData, DeletePeerReviewCoursesResponse, GetAllPeerReviewsCoursesSubmissionsData, GetAllPeerReviewsCoursesSubmissionsResponse, CreatePeerReviewCoursesData, CreatePeerReviewCoursesResponse, GetSingleSubmissionCoursesData, GetSingleSubmissionCoursesResponse, GradeOrCommentOnSubmissionCoursesData, GradeOrCommentOnSubmissionCoursesResponse, UploadFileToSubmissionData, UploadFileCoursesData, MarkSubmissionAsUnreadCoursesData, MarkSubmissionAsReadCoursesData, DeleteAssignmentData, DeleteAssignmentResponse, GetSingleAssignmentData, GetSingleAssignmentResponse, EditAssignmentData, EditAssignmentResponse, ListBlueprintSubscriptionsData, ListBlueprintSubscriptionsResponse, ListBlueprintImportsData, ListBlueprintImportsResponse, ShowBlueprintImportData, ShowBlueprintImportResponse, GetImportDetailsData, GetImportDetailsResponse, GetBlueprintInformationData, GetBlueprintInformationResponse, GetAssociatedCourseInformationData, GetAssociatedCourseInformationResponse, ListBlueprintMigrationsData, ListBlueprintMigrationsResponse, BeginMigrationToPushToAssociatedCoursesData, BeginMigrationToPushToAssociatedCoursesResponse, ShowBlueprintMigrationData, ShowBlueprintMigrationResponse, GetMigrationDetailsData, GetMigrationDetailsResponse, SetOrRemoveRestrictionsOnBlueprintCourseObjectData, GetUnsyncedChangesData, GetUnsyncedChangesResponse, UpdateAssociatedCoursesData, GetCourseTimetableData, SetCourseTimetableData, CreateOrUpdateEventsDirectlyForCourseTimetableData, ListCollaborationsCoursesData, ListCollaborationsCoursesResponse, ListConferencesCoursesData, ListConferencesCoursesResponse, ListContentExportsCoursesData, ListContentExportsCoursesResponse, ExportContentCoursesData, ExportContentCoursesResponse, ShowContentExportCoursesData, ShowContentExportCoursesResponse, ListLicensesCoursesData, ListLicensesCoursesResponse, ListContentMigrationsCoursesData, ListContentMigrationsCoursesResponse, CreateContentMigrationCoursesData, CreateContentMigrationCoursesResponse, ListMigrationSystemsCoursesData, ListMigrationSystemsCoursesResponse, ListMigrationIssuesCoursesData, ListMigrationIssuesCoursesResponse, GetMigrationIssueCoursesData, GetMigrationIssueCoursesResponse, UpdateMigrationIssueCoursesData, UpdateMigrationIssueCoursesResponse, GetContentMigrationCoursesData, GetContentMigrationCoursesResponse, UpdateContentMigrationCoursesData, UpdateContentMigrationCoursesResponse, CopyCourseContentData, GetCourseCopyStatusData, BulkUpdateColumnDataData, BulkUpdateColumnDataResponse, ListCustomGradebookColumnsData, ListCustomGradebookColumnsResponse, CreateCustomGradebookColumnData, CreateCustomGradebookColumnResponse, ReorderCustomColumnsData, DeleteCustomGradebookColumnData, DeleteCustomGradebookColumnResponse, UpdateCustomGradebookColumnData, UpdateCustomGradebookColumnResponse, ListEntriesForColumnData, ListEntriesForColumnResponse, UpdateColumnDataData, UpdateColumnDataResponse, CreateToolFromToolconfigurationCoursesData, CreateToolFromToolconfigurationCoursesResponse, ListDiscussionTopicsCoursesData, ListDiscussionTopicsCoursesResponse, CreateNewDiscussionTopicCoursesData, ReorderPinnedTopicsCoursesData, DeleteTopicCoursesData, GetSingleTopicCoursesData, UpdateTopicCoursesData, ListTopicEntriesCoursesData, PostEntryCoursesData, RateEntryCoursesData, MarkEntryAsUnreadCoursesData, MarkEntryAsReadCoursesData, ListEntryRepliesCoursesData, PostReplyCoursesData, DeleteEntryCoursesData, UpdateEntryCoursesData, ListEntriesCoursesData, MarkTopicAsUnreadCoursesData, MarkTopicAsReadCoursesData, MarkAllEntriesAsUnreadCoursesData, MarkAllEntriesAsReadCoursesData, UnsubscribeFromTopicCoursesData, SubscribeToTopicCoursesData, GetFullTopicCoursesData, GetEffectiveDueDatesData, ListEnrollmentsCoursesData, ListEnrollmentsCoursesResponse, EnrollUserCoursesData, EnrollUserCoursesResponse, ConcludeDeactivateOrDeleteEnrollmentData, ConcludeDeactivateOrDeleteEnrollmentResponse, AcceptCourseInvitationData, ReActivateEnrollmentData, ReActivateEnrollmentResponse, RejectCourseInvitationData, CreateEpubExportData, CreateEpubExportResponse, ShowEpubExportData, ShowEpubExportResponse, ListExternalFeedsCoursesData, ListExternalFeedsCoursesResponse, CreateExternalFeedCoursesData, CreateExternalFeedCoursesResponse, DeleteExternalFeedCoursesData, DeleteExternalFeedCoursesResponse, ListExternalToolsCoursesData, CreateExternalToolCoursesData, GetSessionlessLaunchUrlForExternalToolCoursesData, DeleteExternalToolCoursesData, GetSingleExternalToolCoursesData, EditExternalToolCoursesData, ListFeaturesCoursesData, ListFeaturesCoursesResponse, ListEnabledFeaturesCoursesData, RemoveFeatureFlagCoursesData, RemoveFeatureFlagCoursesResponse, GetFeatureFlagCoursesData, GetFeatureFlagCoursesResponse, SetFeatureFlagCoursesData, SetFeatureFlagCoursesResponse, ListFilesCoursesData, ListFilesCoursesResponse, GetQuotaInformationCoursesData, GetFileCoursesData, GetFileCoursesResponse, ListAllFoldersCoursesData, ListAllFoldersCoursesResponse, CreateFolderCoursesData, CreateFolderCoursesResponse, ResolvePathCoursesData, ResolvePathCoursesResponse, ResolvePathCoursesFullPathData, ResolvePathCoursesFullPathResponse, GetFolderCoursesData, GetFolderCoursesResponse, ShowFrontPageCoursesData, ShowFrontPageCoursesResponse, UpdateCreateFrontPageCoursesData, UpdateCreateFrontPageCoursesResponse, DaysInGradebookHistoryForThisCourseData, DaysInGradebookHistoryForThisCourseResponse, ListUncollatedSubmissionVersionsData, ListUncollatedSubmissionVersionsResponse, DetailsForGivenDateInGradebookHistoryForThisCourseData, DetailsForGivenDateInGradebookHistoryForThisCourseResponse, ListsSubmissionsData, ListsSubmissionsResponse, ListGradingPeriodsCoursesData, ListGradingPeriodsCoursesResponse, DeleteGradingPeriodCoursesData, GetSingleGradingPeriodData, UpdateSingleGradingPeriodData, ListGradingStandardsAvailableInContextCoursesData, ListGradingStandardsAvailableInContextCoursesResponse, CreateNewGradingStandardCoursesData, CreateNewGradingStandardCoursesResponse, GetSingleGradingStandardInContextCoursesData, GetSingleGradingStandardInContextCoursesResponse, ListGroupCategoriesForContextCoursesData, ListGroupCategoriesForContextCoursesResponse, CreateGroupCategoryCoursesData, CreateGroupCategoryCoursesResponse, ListGroupsAvailableInContextCoursesData, ListGroupsAvailableInContextCoursesResponse, ListLiveAssessmentsData, CreateOrFindLiveAssessmentData, ListLiveAssessmentResultsData, CreateLiveAssessmentResultsData, GetModuleItemSequenceData, GetModuleItemSequenceResponse, ListModulesData, ListModulesResponse, CreateModuleData, CreateModuleResponse, DeleteModuleData, DeleteModuleResponse, ShowModuleData, ShowModuleResponse, UpdateModuleData, UpdateModuleResponse, ReLockModuleProgressionsData, ReLockModuleProgressionsResponse, ListModuleItemsData, ListModuleItemsResponse, CreateModuleItemData, CreateModuleItemResponse, DeleteModuleItemData, DeleteModuleItemResponse, ShowModuleItemData, ShowModuleItemResponse, UpdateModuleItemData, UpdateModuleItemResponse, MarkModuleItemAsDoneNotDoneData, MarkModuleItemReadData, SelectMasteryPathData, GetAlignedAssignmentsForOutcomeInCourseForParticularStudentData, GetAlignedAssignmentsForOutcomeInCourseForParticularStudentResponse, GetAllOutcomeLinksForContextCoursesData, GetAllOutcomeLinksForContextCoursesResponse, GetAllOutcomeGroupsForContextCoursesData, GetAllOutcomeGroupsForContextCoursesResponse, DeleteOutcomeGroupCoursesData, DeleteOutcomeGroupCoursesResponse, ShowOutcomeGroupCoursesData, ShowOutcomeGroupCoursesResponse, UpdateOutcomeGroupCoursesData, UpdateOutcomeGroupCoursesResponse, ImportOutcomeGroupCoursesData, ImportOutcomeGroupCoursesResponse, ListLinkedOutcomesCoursesData, ListLinkedOutcomesCoursesResponse, CreateLinkOutcomeCoursesData, CreateLinkOutcomeCoursesResponse, UnlinkOutcomeCoursesData, UnlinkOutcomeCoursesResponse, CreateLinkOutcomeCoursesOutcomeIdData, CreateLinkOutcomeCoursesOutcomeIdResponse, ListSubgroupsCoursesData, ListSubgroupsCoursesResponse, CreateSubgroupCoursesData, CreateSubgroupCoursesResponse, ImportOutcomesCoursesData, ImportOutcomesCoursesResponse, GetOutcomeImportStatusCoursesData, GetOutcomeImportStatusCoursesResponse, GetOutcomeResultsData, GetOutcomeResultsResponse, GetOutcomeResultRollupsData, GetOutcomeResultRollupsResponse, ListPagesCoursesData, ListPagesCoursesResponse, CreatePageCoursesData, CreatePageCoursesResponse, DeletePageCoursesData, DeletePageCoursesResponse, ShowPageCoursesData, ShowPageCoursesResponse, UpdateCreatePageCoursesData, UpdateCreatePageCoursesResponse, DuplicatePageData, DuplicatePageResponse, ListRevisionsCoursesData, ListRevisionsCoursesResponse, ShowRevisionCoursesLatestData, ShowRevisionCoursesLatestResponse, ShowRevisionCoursesRevisionIdData, ShowRevisionCoursesRevisionIdResponse, RevertToRevisionCoursesData, RevertToRevisionCoursesResponse, CoursePermissionData, CoursePermissionResponse, ListPotentialMembersCoursesData, ListPotentialMembersCoursesResponse, PreviewProcessedHtmlCourseData, SetExtensionsForStudentQuizSubmissionsData, ListQuizzesInCourseData, ListQuizzesInCourseResponse, CreateQuizData, CreateQuizResponse, RetrieveAssignmentOverriddenDatesForQuizzesData, RetrieveAssignmentOverriddenDatesForQuizzesResponse, DeleteQuizData, DeleteQuizResponse, GetSingleQuizData, GetSingleQuizResponse, EditQuizData, EditQuizResponse, ReorderQuizItemsData, SendMessageToUnsubmittedOrSubmittedUsersForQuizData, ValidateQuizAccessCodeData, ValidateQuizAccessCodeResponse, SetExtensionsForStudentQuizData, CreateQuestionGroupData, DeleteQuestionGroupData, GetSingleQuizGroupData, GetSingleQuizGroupResponse, UpdateQuestionGroupData, ReorderQuestionGroupsData, GetAvailableQuizIpFiltersData, ListQuestionsInQuizOrSubmissionData, ListQuestionsInQuizOrSubmissionResponse, CreateSingleQuizQuestionData, CreateSingleQuizQuestionResponse, DeleteQuizQuestionData, GetSingleQuizQuestionData, GetSingleQuizQuestionResponse, UpdateExistingQuizQuestionData, UpdateExistingQuizQuestionResponse, RetrieveAllQuizReportsData, RetrieveAllQuizReportsResponse, CreateQuizReportData, CreateQuizReportResponse, AbortGenerationOfReportOrRemovePreviouslyGeneratedOneData, GetQuizReportData, GetQuizReportResponse, FetchingLatestQuizStatisticsData, GetQuizSubmissionData, GetAllQuizSubmissionsData, CreateQuizSubmissionStartQuizTakingSessionData, UploadFileQuizSubmissionData, GetSingleQuizSubmissionData, UpdateStudentQuestionScoresAndCommentsData, CompleteQuizSubmissionTurnItInData, RetrieveCapturedEventsData, SubmitCapturedEventsData, GetCurrentQuizSubmissionTimesData, ListRecentlyLoggedInStudentsData, ListRecentlyLoggedInStudentsResponse, ResetCourseData, ResetCourseResponse, RedirectToRootOutcomeGroupForContextCoursesData, ListRubricsCoursesData, GetSingleRubricCoursesData, GetSingleRubricCoursesResponse, ListUsersInCourseSearchUsersData, ListUsersInCourseSearchUsersResponse, ListCourseSectionsData, ListCourseSectionsResponse, CreateCourseSectionData, CreateCourseSectionResponse, GetSectionInformationCoursesData, GetSectionInformationCoursesResponse, GetCourseSettingsData, UpdateCourseSettingsData, ListStudentsData, ListStudentsResponse, ListSubmissionsForMultipleAssignmentsCoursesData, ListSubmissionsForMultipleAssignmentsCoursesResponse, GradeOrCommentOnMultipleSubmissionsCoursesSubmissionsData, GradeOrCommentOnMultipleSubmissionsCoursesSubmissionsResponse, ListAvailableTabsForCourseOrGroupCoursesData, UpdateTabForCourseData, UpdateTabForCourseResponse, CourseTodoItemsData, RemoveUsageRightsCoursesData, SetUsageRightsCoursesData, SetUsageRightsCoursesResponse, ListUsersInCourseUsersData, ListUsersInCourseUsersResponse, GetSingleUserData, GetSingleUserResponse, AddsLastAttendedDateToStudentEnrollmentInCourseData, AddsLastAttendedDateToStudentEnrollmentInCourseResponse, DeleteConcludeCourseData, GetSingleCourseCoursesData, GetSingleCourseCoursesResponse, UpdateCourseData, GetLatePolicyData, PatchLatePolicyData, CreateLatePolicyData, ListCoursesWithTheirLatestEpubExportData, ListCoursesWithTheirLatestEpubExportResponse, CreateErrorReportData, DeleteFileData, DeleteFileResponse, GetFileFilesData, GetFileFilesResponse, UpdateFileData, UpdateFileResponse, GetPublicInlinePreviewUrlData, CopyFileData, CopyFileResponse, CopyFolderData, CopyFolderResponse, UploadFileToFolderData, CreateFolderFoldersData, CreateFolderFoldersResponse, DeleteFolderData, GetFolderFoldersData, GetFolderFoldersResponse, UpdateFolderData, UpdateFolderResponse, ListFilesFoldersData, ListFilesFoldersResponse, ListFoldersData, ListFoldersResponse, DeleteOutcomeGroupGlobalData, DeleteOutcomeGroupGlobalResponse, ShowOutcomeGroupGlobalData, ShowOutcomeGroupGlobalResponse, UpdateOutcomeGroupGlobalData, UpdateOutcomeGroupGlobalResponse, ImportOutcomeGroupGlobalData, ImportOutcomeGroupGlobalResponse, ListLinkedOutcomesGlobalData, ListLinkedOutcomesGlobalResponse, CreateLinkOutcomeGlobalData, CreateLinkOutcomeGlobalResponse, UnlinkOutcomeGlobalData, UnlinkOutcomeGlobalResponse, CreateLinkOutcomeGlobalOutcomeIdData, CreateLinkOutcomeGlobalOutcomeIdResponse, ListSubgroupsGlobalData, ListSubgroupsGlobalResponse, CreateSubgroupGlobalData, CreateSubgroupGlobalResponse, RedirectToRootOutcomeGroupForContextGlobalData, DeleteGroupCategoryData, GetSingleGroupCategoryData, GetSingleGroupCategoryResponse, UpdateGroupCategoryData, UpdateGroupCategoryResponse, AssignUnassignedMembersData, AssignUnassignedMembersResponse, CreateGroupGroupCategoriesData, CreateGroupGroupCategoriesResponse, ListUsersInGroupCategoryData, ListUsersInGroupCategoryResponse, CreateGroupGroupsData, CreateGroupGroupsResponse, DeleteGroupData, DeleteGroupResponse, GetSingleGroupData, GetSingleGroupResponse, EditGroupData, EditGroupResponse, GroupActivityStreamData, GroupActivityStreamSummaryData, RedirectToAssignmentOverrideForGroupData, ListCollaborationsGroupsData, ListCollaborationsGroupsResponse, ListConferencesGroupsData, ListConferencesGroupsResponse, ListContentExportsGroupsData, ListContentExportsGroupsResponse, ExportContentGroupsData, ExportContentGroupsResponse, ShowContentExportGroupsData, ShowContentExportGroupsResponse, ListLicensesGroupsData, ListLicensesGroupsResponse, ListContentMigrationsGroupsData, ListContentMigrationsGroupsResponse, CreateContentMigrationGroupsData, CreateContentMigrationGroupsResponse, ListMigrationSystemsGroupsData, ListMigrationSystemsGroupsResponse, ListMigrationIssuesGroupsData, ListMigrationIssuesGroupsResponse, GetMigrationIssueGroupsData, GetMigrationIssueGroupsResponse, UpdateMigrationIssueGroupsData, UpdateMigrationIssueGroupsResponse, GetContentMigrationGroupsData, GetContentMigrationGroupsResponse, UpdateContentMigrationGroupsData, UpdateContentMigrationGroupsResponse, ListDiscussionTopicsGroupsData, ListDiscussionTopicsGroupsResponse, CreateNewDiscussionTopicGroupsData, ReorderPinnedTopicsGroupsData, DeleteTopicGroupsData, GetSingleTopicGroupsData, UpdateTopicGroupsData, ListTopicEntriesGroupsData, PostEntryGroupsData, RateEntryGroupsData, MarkEntryAsUnreadGroupsData, MarkEntryAsReadGroupsData, ListEntryRepliesGroupsData, PostReplyGroupsData, DeleteEntryGroupsData, UpdateEntryGroupsData, ListEntriesGroupsData, MarkTopicAsUnreadGroupsData, MarkTopicAsReadGroupsData, MarkAllEntriesAsUnreadGroupsData, MarkAllEntriesAsReadGroupsData, UnsubscribeFromTopicGroupsData, SubscribeToTopicGroupsData, GetFullTopicGroupsData, ListExternalFeedsGroupsData, ListExternalFeedsGroupsResponse, CreateExternalFeedGroupsData, CreateExternalFeedGroupsResponse, DeleteExternalFeedGroupsData, DeleteExternalFeedGroupsResponse, ListExternalToolsGroupsData, UploadFileToGroupData, GetQuotaInformationGroupsData, GetFileGroupsData, GetFileGroupsResponse, ListAllFoldersGroupsData, ListAllFoldersGroupsResponse, CreateFolderGroupsData, CreateFolderGroupsResponse, ResolvePathGroupsData, ResolvePathGroupsResponse, ResolvePathGroupsFullPathData, ResolvePathGroupsFullPathResponse, GetFolderGroupsData, GetFolderGroupsResponse, ShowFrontPageGroupsData, ShowFrontPageGroupsResponse, UpdateCreateFrontPageGroupsData, UpdateCreateFrontPageGroupsResponse, InviteOthersToGroupData, ListGroupMembershipsData, ListGroupMembershipsResponse, CreateMembershipData, CreateMembershipResponse, LeaveGroupMembershipsData, GetSingleGroupMembershipMembershipsData, GetSingleGroupMembershipMembershipsResponse, UpdateMembershipMembershipsData, UpdateMembershipMembershipsResponse, ListPagesGroupsData, ListPagesGroupsResponse, CreatePageGroupsData, CreatePageGroupsResponse, DeletePageGroupsData, DeletePageGroupsResponse, ShowPageGroupsData, ShowPageGroupsResponse, UpdateCreatePageGroupsData, UpdateCreatePageGroupsResponse, ListRevisionsGroupsData, ListRevisionsGroupsResponse, ShowRevisionGroupsLatestData, ShowRevisionGroupsLatestResponse, ShowRevisionGroupsRevisionIdData, ShowRevisionGroupsRevisionIdResponse, RevertToRevisionGroupsData, RevertToRevisionGroupsResponse, GroupPermissionData, ListPotentialMembersGroupsData, ListPotentialMembersGroupsResponse, PreviewProcessedHtmlGroupData, ListAvailableTabsForCourseOrGroupGroupsData, RemoveUsageRightsGroupsData, SetUsageRightsGroupsData, SetUsageRightsGroupsResponse, ListGroupSusersData, ListGroupSusersResponse, LeaveGroupUsersData, GetSingleGroupMembershipUsersData, GetSingleGroupMembershipUsersResponse, UpdateMembershipUsersData, UpdateMembershipUsersResponse, CreateJwtData, CreateJwtResponse, RefreshJwtData, RefreshJwtResponse, ShowOutcomeData, ShowOutcomeResponse, UpdateOutcomeData, UpdateOutcomeResponse, ListPlannerItemsData, ListPlannerOverridesData, ListPlannerOverridesResponse, CreatePlannerOverrideData, CreatePlannerOverrideResponse, DeletePlannerOverrideData, DeletePlannerOverrideResponse, ShowPlannerOverrideData, ShowPlannerOverrideResponse, UpdatePlannerOverrideData, UpdatePlannerOverrideResponse, ListPlannerNotesData, ListPlannerNotesResponse, CreatePlannerNoteData, CreatePlannerNoteResponse, DeletePlannerNoteData, DeletePlannerNoteResponse, ShowPlannernoteData, ShowPlannernoteResponse, UpdatePlannernoteData, UpdatePlannernoteResponse, ListClosedPollSessionsData, ListOpenedPollSessionsData, ListPollsData, CreateSinglePollData, DeletePollData, GetSinglePollData, UpdateSinglePollData, ListPollChoicesInPollData, CreateSinglePollChoiceData, DeletePollChoiceData, GetSinglePollChoiceData, UpdateSinglePollChoiceData, ListPollSessionsForPollData, CreateSinglePollSessionData, DeletePollSessionData, GetResultsForSinglePollSessionData, UpdateSinglePollSessionData, CloseOpenedPollSessionData, OpenPollSessionData, CreateSinglePollSubmissionData, GetSinglePollSubmissionData, QueryProgressData, QueryProgressResponse, GetAllQuizSubmissionQuestionsData, AnsweringQuestionsData, AnsweringQuestionsResponse, FlaggingQuestionData, UnflaggingQuestionData, ListAllCoursesData, ListAllCoursesResponse, FindRecipientsSearchData, RedirectToAssignmentOverrideForSectionData, DeleteSectionData, DeleteSectionResponse, GetSectionInformationSectionsData, GetSectionInformationSectionsResponse, EditSectionData, EditSectionResponse, DeCrossListSectionData, DeCrossListSectionResponse, CrossListSectionData, CrossListSectionResponse, GetAllPeerReviewsSectionsPeerReviewsData, GetAllPeerReviewsSectionsPeerReviewsResponse, SubmissionSummarySectionsData, ListAssignmentSubmissionsSectionsData, ListAssignmentSubmissionsSectionsResponse, SubmitAssignmentSectionsData, GradeOrCommentOnMultipleSubmissionsSectionsAssignmentsData, GradeOrCommentOnMultipleSubmissionsSectionsAssignmentsResponse, DeletePeerReviewSectionsData, DeletePeerReviewSectionsResponse, GetAllPeerReviewsSectionsSubmissionsData, GetAllPeerReviewsSectionsSubmissionsResponse, CreatePeerReviewSectionsData, CreatePeerReviewSectionsResponse, GetSingleSubmissionSectionsData, GradeOrCommentOnSubmissionSectionsData, GradeOrCommentOnSubmissionSectionsResponse, UploadFileSectionsData, MarkSubmissionAsUnreadSectionsData, MarkSubmissionAsReadSectionsData, ListEnrollmentsSectionsData, ListEnrollmentsSectionsResponse, EnrollUserSectionsData, EnrollUserSectionsResponse, ListSubmissionsForMultipleAssignmentsSectionsData, GradeOrCommentOnMultipleSubmissionsSectionsSubmissionsData, GradeOrCommentOnMultipleSubmissionsSectionsSubmissionsResponse, GetKalturaConfigData, StartKalturaSessionData, UnShareBrandconfigThemeData, UnShareBrandconfigThemeResponse, ListActivityStreamActivityStreamData, ListActivityStreamActivityStreamResponse, HideAllStreamItemsData, ListActivityStreamSelfData, ActivityStreamSummaryData, HideStreamItemData, ListBookmarksData, ListBookmarksResponse, CreateBookmarkData, CreateBookmarkResponse, DeleteBookmarkData, GetBookmarkData, GetBookmarkResponse, UpdateBookmarkData, UpdateBookmarkResponse, DeletePushNotificationEndpointData, DeletePushNotificationEndpointResponse, UpdatePreferencesByCategoryData, UpdateMultiplePreferencesCommunicationChannelIdData, UpdatePreferenceCommunicationChannelIdData, UpdateMultiplePreferencesTypeData, UpdatePreferenceTypeData, ClearCourseNicknamesData, ListCourseNicknamesData, ListCourseNicknamesResponse, RemoveCourseNicknameData, RemoveCourseNicknameResponse, GetCourseNicknameData, GetCourseNicknameResponse, SetCourseNicknameData, SetCourseNicknameResponse, ResetCourseFavoritesData, ListFavoriteCoursesData, ListFavoriteCoursesResponse, RemoveCourseFromFavoritesData, RemoveCourseFromFavoritesResponse, AddCourseToFavoritesData, AddCourseToFavoritesResponse, ResetGroupFavoritesData, ListFavoriteGroupsData, ListFavoriteGroupsResponse, RemoveGroupFromFavoritesData, RemoveGroupFromFavoritesResponse, AddGroupToFavoritesData, AddGroupToFavoritesResponse, ListYourGroupsData, ListYourGroupsResponse, GetPandataEventsJwtTokenAndItsExpirationDateData, ListTodoItemsData, ListCountsForTodoItemsData, ListUpcomingAssignmentsCalendarEventsData, ShowUserDetailsData, ShowUserDetailsResponse, EditUserData, EditUserResponse, GetCustomColorsData, GetCustomColorsResponse, GetCustomColorData, UpdateCustomColorData, GetDashboardPositionsData, UpdateDashboardPositionsData, MergeUserIntoAnotherUserAccountsData, MergeUserIntoAnotherUserAccountsResponse, MergeUserIntoAnotherUserDestinationUserIdData, MergeUserIntoAnotherUserDestinationUserIdResponse, UpdateUserSettingsData, SplitMergedUsersIntoSeparateUsersData, SplitMergedUsersIntoSeparateUsersResponse, ListAvatarOptionsData, ListAvatarOptionsResponse, ListCalendarEventsForUserData, ListCalendarEventsForUserResponse, ListUserCommunicationChannelsData, ListUserCommunicationChannelsResponse, CreateCommunicationChannelData, CreateCommunicationChannelResponse, ListOfPreferenceCategoriesData, ListPreferencesCommunicationChannelIdData, ListPreferencesCommunicationChannelIdResponse, GetPreferenceCommunicationChannelIdData, GetPreferenceCommunicationChannelIdResponse, DeleteCommunicationChannelIdData, DeleteCommunicationChannelIdResponse, DeleteCommunicationChannelTypeData, DeleteCommunicationChannelTypeResponse, ListPreferencesTypeData, ListPreferencesTypeResponse, GetPreferenceTypeData, GetPreferenceTypeResponse, ListContentExportsUsersData, ListContentExportsUsersResponse, ExportContentUsersData, ExportContentUsersResponse, ShowContentExportUsersData, ShowContentExportUsersResponse, ListLicensesUsersData, ListLicensesUsersResponse, ListContentMigrationsUsersData, ListContentMigrationsUsersResponse, CreateContentMigrationUsersData, CreateContentMigrationUsersResponse, ListMigrationSystemsUsersData, ListMigrationSystemsUsersResponse, ListMigrationIssuesUsersData, ListMigrationIssuesUsersResponse, GetMigrationIssueUsersData, GetMigrationIssueUsersResponse, UpdateMigrationIssueUsersData, UpdateMigrationIssueUsersResponse, GetContentMigrationUsersData, GetContentMigrationUsersResponse, UpdateContentMigrationUsersData, UpdateContentMigrationUsersResponse, ListCoursesForUserData, ListCoursesForUserResponse, ListAssignmentsForUserData, ListAssignmentsForUserResponse, DeleteCustomDataData, LoadCustomDataData, StoreCustomDataData, ListEnrollmentsUsersData, ListEnrollmentsUsersResponse, ListFeaturesUsersData, ListFeaturesUsersResponse, ListEnabledFeaturesUsersData, RemoveFeatureFlagUsersData, RemoveFeatureFlagUsersResponse, GetFeatureFlagUsersData, GetFeatureFlagUsersResponse, SetFeatureFlagUsersData, SetFeatureFlagUsersResponse, UploadFileToUsersFilesData, GetQuotaInformationUsersData, GetFileUsersData, GetFileUsersResponse, ListAllFoldersUsersData, ListAllFoldersUsersResponse, CreateFolderUsersData, CreateFolderUsersResponse, ResolvePathUsersData, ResolvePathUsersResponse, ResolvePathUsersFullPathData, ResolvePathUsersFullPathResponse, GetFolderUsersData, GetFolderUsersResponse, ListUserLoginsUsersData, DeleteUserLoginData, ListMissingSubmissionsData, ListMissingSubmissionsResponse, ListObserveesData, ListObserveesResponse, AddObserveeWithCredentialsData, AddObserveeWithCredentialsResponse, RemoveObserveeData, RemoveObserveeResponse, ShowObserveeData, ShowObserveeResponse, AddObserveeData, AddObserveeResponse, ListUserPageViewsData, ListUserPageViewsResponse, GetUserProfileData, GetUserProfileResponse, RemoveUsageRightsUsersData, SetUsageRightsUsersData, SetUsageRightsUsersResponse } from './types.gen'; +import { client as _heyApiClient } from './client.gen'; + +export type Options = ClientOptions & { + /** + * 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; +}; + +/** + * Get a single assignment (lti) + * Get a single Canvas assignment by Canvas id or LTI id. Tool providers may only access + * assignments that are associated with their tool. + */ +export const getSingleAssignmentLti = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/assignments/{assignment_id}', + ...options + }); +}; + +/** + * Show an Originality Report + * Get a single originality report + */ +export const showOriginalityReportFiles = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/assignments/{assignment_id}/files/{file_id}/originality_report', + ...options + }); +}; + +/** + * Edit an Originality Report + * Modify an existing originality report. An alternative to this endpoint is + * to POST the same parameters listed below to the CREATE endpoint. + */ +export const editOriginalityReportFiles = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/assignments/{assignment_id}/files/{file_id}/originality_report', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get a single submission + * Get a single submission, based on submission id. + */ +export const getSingleSubmission = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/assignments/{assignment_id}/submissions/{submission_id}', + ...options + }); +}; + +/** + * Get the history of a single submission + * Get a list of all attempts made for a submission, based on submission id. + */ +export const getHistoryOfSingleSubmission = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/assignments/{assignment_id}/submissions/{submission_id}/history', + ...options + }); +}; + +/** + * Create an Originality Report + * Create a new OriginalityReport for the specified file + */ +export const createOriginalityReport = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/assignments/{assignment_id}/submissions/{submission_id}/originality_report', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Show an Originality Report + * Get a single originality report + */ +export const showOriginalityReportSubmissions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/assignments/{assignment_id}/submissions/{submission_id}/originality_report/{id}', + ...options + }); +}; + +/** + * Edit an Originality Report + * Modify an existing originality report. An alternative to this endpoint is + * to POST the same parameters listed below to the CREATE endpoint. + */ +export const editOriginalityReportSubmissions = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/assignments/{assignment_id}/submissions/{submission_id}/originality_report/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get all users in a group (lti) + * Get all Canvas users in a group. Tool providers may only access + * groups that belong to the context the tool is installed in. + */ +export const getAllUsersInGroupLti = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/groups/{group_id}/users', + ...options + }); +}; + +/** + * List all Webhook Subscription for a tool proxy + * This endpoint returns a paginated list with a default limit of 100 items per result set. + * You can retrieve the next result set by setting a 'StartKey' header in your next request + * with the value of the 'EndKey' header in the response. + * + * Example use of a 'StartKey' header object: + * { "Id":"71d6dfba-0547-477d-b41d-db8cb528c6d1","DeveloperKey":"10000000000001" } + */ +export const listAllWebhookSubscriptionForToolProxy = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/subscriptions', + ...options + }); +}; + +/** + * Create a Webhook Subscription + * Creates a webook subscription for the specified event type and + * context. + */ +export const createWebhookSubscription = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/subscriptions', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a Webhook Subscription + */ +export const deleteWebhookSubscription = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/subscriptions/{id}', + ...options + }); +}; + +/** + * Show a single Webhook Subscription + */ +export const showSingleWebhookSubscription = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/subscriptions/{id}', + ...options + }); +}; + +/** + * Update a Webhook Subscription + * This endpoint uses the same parameters as the create endpoint + */ +export const updateWebhookSubscription = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/subscriptions/{id}', + ...options + }); +}; + +/** + * Get a single user (lti) + * Get a single Canvas user by Canvas id or LTI id. Tool providers may only access + * users that have been assigned an assignment associated with their tool. + */ +export const getSingleUserLti = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/lti/users/{id}', + ...options + }); +}; + +/** + * Retrieve assignments enabled for grade export to SIS + * Retrieve a list of published assignments flagged as "post_to_sis". + * See the Assignments API for more details on assignments. + * Assignment group and section information are included for convenience. + * + * Each section includes course information for the origin course and the + * cross-listed course, if applicable. The `origin_course` is the course to + * which the section belongs or the course from which the section was + * cross-listed. Generally, the `origin_course` should be preferred when + * performing integration work. The `xlist_course` is provided for consistency + * and is only present when the section has been cross-listed. + * See Sections API and Courses Api for me details. + * + * The `override` is only provided if the Differentiated Assignments course + * feature is turned on and the assignment has an override for that section. + * When there is an override for the assignment the override object's + * keys/values can be merged with the top level assignment object to create a + * view of the assignment object specific to that section. + * See Assignments api for more information on assignment overrides. + * + * restricts to courses that start before this date (if they have a start date) + * restricts to courses that end after this date (if they have an end date) + * information to include. + * + * "student_overrides":: returns individual student override information + */ +export const retrieveAssignmentsEnabledForGradeExportToSisAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/sis/accounts/{account_id}/assignments', + ...options + }); +}; + +/** + * Retrieve assignments enabled for grade export to SIS + * Retrieve a list of published assignments flagged as "post_to_sis". + * See the Assignments API for more details on assignments. + * Assignment group and section information are included for convenience. + * + * Each section includes course information for the origin course and the + * cross-listed course, if applicable. The `origin_course` is the course to + * which the section belongs or the course from which the section was + * cross-listed. Generally, the `origin_course` should be preferred when + * performing integration work. The `xlist_course` is provided for consistency + * and is only present when the section has been cross-listed. + * See Sections API and Courses Api for me details. + * + * The `override` is only provided if the Differentiated Assignments course + * feature is turned on and the assignment has an override for that section. + * When there is an override for the assignment the override object's + * keys/values can be merged with the top level assignment object to create a + * view of the assignment object specific to that section. + * See Assignments api for more information on assignment overrides. + * + * restricts to courses that start before this date (if they have a start date) + * restricts to courses that end after this date (if they have an end date) + * information to include. + * + * "student_overrides":: returns individual student override information + */ +export const retrieveAssignmentsEnabledForGradeExportToSisCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/sis/courses/{course_id}/assignments', + ...options + }); +}; + +/** + * Disable assignments currently enabled for grade export to SIS + * Disable all assignments flagged as "post_to_sis", with the option of making it + * specific to a grading period, in a course. + * + * On success, the response will be 204 No Content with an empty body. + * + * On failure, the response will be 400 Bad Request with a body of a specific + * message. + * + * For disabling assignments in a specific grading period + */ +export const disableAssignmentsCurrentlyEnabledForGradeExportToSis = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/sis/courses/{course_id}/disable_post_to_sis', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List accounts + * A paginated list of accounts that the current user can view or manage. + * Typically, students and even teachers will get an empty list in response, + * only account admins can view the accounts that they are in. + */ +export const listAccounts = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts', + ...options + }); +}; + +/** + * Search account domains + * Returns a list of up to 5 matching account domains + * + * Partial match on name / domain are supported + */ +export const searchAccountDomains = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/search', + ...options + }); +}; + +/** + * Index of active global notification for the user + * Returns a list of all global notifications in the account for the current user + * Any notifications that have been closed by the user will not be returned + */ +export const indexOfActiveGlobalNotificationForUser = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/account_notifications', + ...options + }); +}; + +/** + * Create a global notification + * Create and return a new global notification for an account. + */ +export const createGlobalNotification = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/account_notifications', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Close notification for user + * If the current user no long wants to see this notification it can be excused with this call + */ +export const closeNotificationForUser = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/account_notifications/{id}', + ...options + }); +}; + +/** + * Show a global notification + * Returns a global notification for the current user + * A notification that has been closed by the user will not be returned + */ +export const showGlobalNotification = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/account_notifications/{id}', + ...options + }); +}; + +/** + * Update a global notification + * Update global notification for an account. + */ +export const updateGlobalNotification = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/account_notifications/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List account admins + * A paginated list of the admins in the account + */ +export const listAccountAdmins = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/admins', + ...options + }); +}; + +/** + * Make an account admin + * Flag an existing user as an admin within the account. + */ +export const makeAccountAdmin = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/admins', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Remove account admin + * Remove the rights associated with an account admin role from a user. + */ +export const removeAccountAdmin = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/admins/{user_id}', + ...options + }); +}; + +/** + * Get department-level participation data + * Returns page view hits summed across all courses in the department. Two + * groupings of these counts are returned; one by day (+by_date+), the other + * by category (+by_category+). The possible categories are announcements, + * assignments, collaborations, conferences, discussions, files, general, + * grades, groups, modules, other, pages, and quizzes. + * + * This and the other department-level endpoints have three variations which + * all return the same style of data but for different subsets of courses. All + * share the prefix /api/v1/accounts//analytics. The possible + * suffixes are: + * + * * /current: includes all available courses in the default term + * * /completed: includes all concluded courses in the default term + * * /terms/: includes all available or concluded courses in the + * given term. + * + * Courses not yet offered or which have been deleted are never included. + * + * /current and /completed are intended for use when the account has only one + * term. /terms/ is intended for use when the account has multiple + * terms. + * + * The action follows the suffix. + */ +export const getDepartmentLevelParticipationDataCompleted = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/analytics/completed/activity', + ...options + }); +}; + +/** + * Get department-level grade data + * Returns the distribution of grades for students in courses in the + * department. Each data point is one student's current grade in one course; + * if a student is in multiple courses, he contributes one value per course, + * but if he's enrolled multiple times in the same course (e.g. a lecture + * section and a lab section), he only constributes on value for that course. + * + * Grades are binned to the nearest integer score; anomalous grades outside + * the 0 to 100 range are ignored. The raw counts are returned, not yet + * normalized by the total count. + * + * Shares the same variations on endpoint as the participation data. + */ +export const getDepartmentLevelGradeDataCompleted = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/analytics/completed/grades', + ...options + }); +}; + +/** + * Get department-level statistics + * Returns numeric statistics about the department and term (or filter). + * + * Shares the same variations on endpoint as the participation data. + */ +export const getDepartmentLevelStatisticsCompleted = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/analytics/completed/statistics', + ...options + }); +}; + +/** + * Get department-level participation data + * Returns page view hits summed across all courses in the department. Two + * groupings of these counts are returned; one by day (+by_date+), the other + * by category (+by_category+). The possible categories are announcements, + * assignments, collaborations, conferences, discussions, files, general, + * grades, groups, modules, other, pages, and quizzes. + * + * This and the other department-level endpoints have three variations which + * all return the same style of data but for different subsets of courses. All + * share the prefix /api/v1/accounts//analytics. The possible + * suffixes are: + * + * * /current: includes all available courses in the default term + * * /completed: includes all concluded courses in the default term + * * /terms/: includes all available or concluded courses in the + * given term. + * + * Courses not yet offered or which have been deleted are never included. + * + * /current and /completed are intended for use when the account has only one + * term. /terms/ is intended for use when the account has multiple + * terms. + * + * The action follows the suffix. + */ +export const getDepartmentLevelParticipationDataCurrent = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/analytics/current/activity', + ...options + }); +}; + +/** + * Get department-level grade data + * Returns the distribution of grades for students in courses in the + * department. Each data point is one student's current grade in one course; + * if a student is in multiple courses, he contributes one value per course, + * but if he's enrolled multiple times in the same course (e.g. a lecture + * section and a lab section), he only constributes on value for that course. + * + * Grades are binned to the nearest integer score; anomalous grades outside + * the 0 to 100 range are ignored. The raw counts are returned, not yet + * normalized by the total count. + * + * Shares the same variations on endpoint as the participation data. + */ +export const getDepartmentLevelGradeDataCurrent = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/analytics/current/grades', + ...options + }); +}; + +/** + * Get department-level statistics + * Returns numeric statistics about the department and term (or filter). + * + * Shares the same variations on endpoint as the participation data. + */ +export const getDepartmentLevelStatisticsCurrent = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/analytics/current/statistics', + ...options + }); +}; + +/** + * Get department-level participation data + * Returns page view hits summed across all courses in the department. Two + * groupings of these counts are returned; one by day (+by_date+), the other + * by category (+by_category+). The possible categories are announcements, + * assignments, collaborations, conferences, discussions, files, general, + * grades, groups, modules, other, pages, and quizzes. + * + * This and the other department-level endpoints have three variations which + * all return the same style of data but for different subsets of courses. All + * share the prefix /api/v1/accounts//analytics. The possible + * suffixes are: + * + * * /current: includes all available courses in the default term + * * /completed: includes all concluded courses in the default term + * * /terms/: includes all available or concluded courses in the + * given term. + * + * Courses not yet offered or which have been deleted are never included. + * + * /current and /completed are intended for use when the account has only one + * term. /terms/ is intended for use when the account has multiple + * terms. + * + * The action follows the suffix. + */ +export const getDepartmentLevelParticipationDataTerms = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/analytics/terms/{term_id}/activity', + ...options + }); +}; + +/** + * Get department-level grade data + * Returns the distribution of grades for students in courses in the + * department. Each data point is one student's current grade in one course; + * if a student is in multiple courses, he contributes one value per course, + * but if he's enrolled multiple times in the same course (e.g. a lecture + * section and a lab section), he only constributes on value for that course. + * + * Grades are binned to the nearest integer score; anomalous grades outside + * the 0 to 100 range are ignored. The raw counts are returned, not yet + * normalized by the total count. + * + * Shares the same variations on endpoint as the participation data. + */ +export const getDepartmentLevelGradeDataTerms = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/analytics/terms/{term_id}/grades', + ...options + }); +}; + +/** + * Get department-level statistics + * Returns numeric statistics about the department and term (or filter). + * + * Shares the same variations on endpoint as the participation data. + */ +export const getDepartmentLevelStatisticsTerms = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/analytics/terms/{term_id}/statistics', + ...options + }); +}; + +/** + * List authentication providers + * Returns a paginated list of authentication providers + */ +export const listAuthenticationProviders = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/authentication_providers', + ...options + }); +}; + +/** + * Add authentication provider + * Add external authentication provider(s) for the account. + * Services may be CAS, Facebook, GitHub, Google, LDAP, LinkedIn, + * Microsoft, OpenID Connect, SAML, or Twitter. + * + * Each authentication provider is specified as a set of parameters as + * described below. A provider specification must include an 'auth_type' + * parameter with a value of 'canvas', 'cas', 'clever', 'facebook', 'github', 'google', + * 'ldap', 'linkedin', 'microsoft', 'openid_connect', 'saml', or 'twitter'. The other + * recognized parameters depend on this auth_type; unrecognized parameters are discarded. + * Provider specifications not specifying a valid auth_type are ignored. + * + * You can set the 'position' for any configuration. The config in the 1st position + * is considered the default. You can set 'jit_provisioning' for any configuration + * besides Canvas. + * + * For Canvas, the additional recognized parameter is: + * + * - self_registration + * + * 'all', 'none', or 'observer' - who is allowed to register as a new user + * + * For CAS, the additional recognized parameters are: + * + * - auth_base + * + * The CAS server's URL. + * + * - log_in_url [Optional] + * + * An alternate SSO URL for logging into CAS. You probably should not set + * this. + * + * For Clever, the additional recognized parameters are: + * + * - client_id [Required] + * + * The Clever application's Client ID. Not available if configured globally + * for Canvas. + * + * - client_secret [Required] + * + * The Clever application's Client Secret. Not available if configured + * globally for Canvas. + * + * - district_id [Optional] + * + * A district's Clever ID. Leave this blank to let Clever handle the details + * with its District Picker. This is required for Clever Instant Login to + * work in a multi-tenant environment. + * + * - login_attribute [Optional] + * + * The attribute to use to look up the user's login in Canvas. Either + * 'id' (the default), 'sis_id', 'email', 'student_number', or + * 'teacher_number'. Note that some fields may not be populated for + * all users at Clever. + * + * - federated_attributes [Optional] + * + * See FederatedAttributesConfig. Valid provider attributes are 'id', + * 'sis_id', 'email', 'student_number', and 'teacher_number'. + * + * For Facebook, the additional recognized parameters are: + * + * - app_id [Required] + * + * The Facebook App ID. Not available if configured globally for Canvas. + * + * - app_secret [Required] + * + * The Facebook App Secret. Not available if configured globally for Canvas. + * + * - login_attribute [Optional] + * + * The attribute to use to look up the user's login in Canvas. Either + * 'id' (the default), or 'email' + * + * - federated_attributes [Optional] + * + * See FederatedAttributesConfig. Valid provider attributes are 'email', + * 'first_name', 'id', 'last_name', 'locale', and 'name'. + * + * For GitHub, the additional recognized parameters are: + * + * - domain [Optional] + * + * The domain of a GitHub Enterprise installation. I.e. + * github.mycompany.com. If not set, it will default to the public + * github.com. + * + * - client_id [Required] + * + * The GitHub application's Client ID. Not available if configured globally + * for Canvas. + * + * - client_secret [Required] + * + * The GitHub application's Client Secret. Not available if configured + * globally for Canvas. + * + * - login_attribute [Optional] + * + * The attribute to use to look up the user's login in Canvas. Either + * 'id' (the default), or 'login' + * + * - federated_attributes [Optional] + * + * See FederatedAttributesConfig. Valid provider attributes are 'email', + * 'id', 'login', and 'name'. + * + * For Google, the additional recognized parameters are: + * + * - client_id [Required] + * + * The Google application's Client ID. Not available if configured globally + * for Canvas. + * + * - client_secret [Required] + * + * The Google application's Client Secret. Not available if configured + * globally for Canvas. + * + * - hosted_domain [Optional] + * + * A Google Apps domain to restrict logins to. See + * https://developers.google.com/identity/protocols/OpenIDConnect?hl=en#hd-param + * + * - login_attribute [Optional] + * + * The attribute to use to look up the user's login in Canvas. Either + * 'sub' (the default), or 'email' + * + * - federated_attributes [Optional] + * + * See FederatedAttributesConfig. Valid provider attributes are 'email', + * 'family_name', 'given_name', 'locale', 'name', and 'sub'. + * + * For LDAP, the additional recognized parameters are: + * + * - auth_host + * + * The LDAP server's URL. + * + * - auth_port [Optional, Integer] + * + * The LDAP server's TCP port. (default: 389) + * + * - auth_over_tls [Optional] + * + * Whether to use TLS. Can be 'simple_tls', or 'start_tls'. For backwards + * compatibility, booleans are also accepted, with true meaning simple_tls. + * If not provided, it will default to start_tls. + * + * - auth_base [Optional] + * + * A default treebase parameter for searches performed against the LDAP + * server. + * + * - auth_filter + * + * LDAP search filter. Use !{{login}} as a placeholder for the username + * supplied by the user. For example: "(sAMAccountName=!{{login}})". + * + * - identifier_format [Optional] + * + * The LDAP attribute to use to look up the Canvas login. Omit to use + * the username supplied by the user. + * + * - auth_username + * + * Username + * + * - auth_password + * + * Password + * + * For LinkedIn, the additional recognized parameters are: + * + * - client_id [Required] + * + * The LinkedIn application's Client ID. Not available if configured globally + * for Canvas. + * + * - client_secret [Required] + * + * The LinkedIn application's Client Secret. Not available if configured + * globally for Canvas. + * + * - login_attribute [Optional] + * + * The attribute to use to look up the user's login in Canvas. Either + * 'id' (the default), or 'emailAddress' + * + * - federated_attributes [Optional] + * + * See FederatedAttributesConfig. Valid provider attributes are 'emailAddress', + * 'firstName', 'id', 'formattedName', and 'lastName'. + * + * For Microsoft, the additional recognized parameters are: + * + * - application_id [Required] + * + * The application's ID. + * + * - application_secret [Required] + * + * The application's Client Secret (Password) + * + * - tenant [Optional] + * + * See https://azure.microsoft.com/en-us/documentation/articles/active-directory-v2-protocols/ + * Valid values are 'common', 'organizations', 'consumers', or an Azure Active Directory Tenant + * (as either a UUID or domain, such as contoso.onmicrosoft.com). Defaults to 'common' + * + * - login_attribute [Optional] + * + * See https://azure.microsoft.com/en-us/documentation/articles/active-directory-v2-tokens/#idtokens + * Valid values are 'sub', 'email', 'oid', or 'preferred_username'. Note + * that email may not always be populated in the user's profile at + * Microsoft. Oid will not be populated for personal Microsoft accounts. + * Defaults to 'sub' + * + * - federated_attributes [Optional] + * + * See FederatedAttributesConfig. Valid provider attributes are 'email', + * 'name', 'preferred_username', 'oid', and 'sub'. + * + * For OpenID Connect, the additional recognized parameters are: + * + * - client_id [Required] + * + * The application's Client ID. + * + * - client_secret [Required] + * + * The application's Client Secret. + * + * - authorize_url [Required] + * + * The URL for getting starting the OAuth 2.0 web flow + * + * - token_url [Required] + * + * The URL for exchanging the OAuth 2.0 authorization code for an Access + * Token and ID Token + * + * - scope [Optional] + * + * Space separated additional scopes to request for the token. Note that + * you need not specify the 'openid' scope, or any scopes that can be + * automatically inferred by the rules defined at + * http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims + * + * - end_session_endpoint [Optional] + * + * URL to send the end user to after logging out of Canvas. See + * https://openid.net/specs/openid-connect-session-1_0.html#RPLogout + * + * - userinfo_endpoint [Optional] + * + * URL to request additional claims from. If the initial ID Token received + * from the provider cannot be used to satisfy the login_attribute and + * all federated_attributes, this endpoint will be queried for additional + * information. + * + * - login_attribute [Optional] + * + * The attribute of the ID Token to look up the user's login in Canvas. + * Defaults to 'sub'. + * + * - federated_attributes [Optional] + * + * See FederatedAttributesConfig. Any value is allowed for the provider + * attribute names, but standard claims are listed at + * http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims + * + * For SAML, the additional recognized parameters are: + * + * - metadata [Optional] + * + * An XML document to parse as SAML metadata, and automatically populate idp_entity_id, + * log_in_url, log_out_url, certificate_fingerprint, and identifier_format + * + * - metadata_uri [Optional] + * + * A URI to download the SAML metadata from, and automatically populate idp_entity_id, + * log_in_url, log_out_url, certificate_fingerprint, and identifier_format. This URI + * will also be saved, and the metadata periodically refreshed, automatically. If + * the metadata contains multiple entities, also supply idp_entity_id to distinguish + * which one you want (otherwise the only entity in the metadata will be inferred). + * If you provide the URI 'urn:mace:incommon' or 'http://ukfederation.org.uk', + * the InCommon or UK Access Management Federation metadata aggregate, respectively, + * will be used instead, and additional validation checks will happen (including + * validating that the metadata has been properly signed with the + * appropriate key). + * + * - idp_entity_id + * + * The SAML IdP's entity ID + * + * - log_in_url + * + * The SAML service's SSO target URL + * + * - log_out_url [Optional] + * + * The SAML service's SLO target URL + * + * - certificate_fingerprint + * + * The SAML service's certificate fingerprint. + * + * - identifier_format + * + * The SAML service's identifier format. Must be one of: + * + * - urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + * - urn:oasis:names:tc:SAML:2.0:nameid-format:entity + * - urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos + * - urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + * - urn:oasis:names:tc:SAML:2.0:nameid-format:transient + * - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + * - urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName + * - urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName + * + * - requested_authn_context [Optional] + * + * The SAML AuthnContext + * + * - sig_alg [Optional] + * + * If set, +AuthnRequest+, +LogoutRequest+, and +LogoutResponse+ messages + * are signed with the corresponding algorithm. Supported algorithms are: + * + * - {http://www.w3.org/2000/09/xmldsig#rsa-sha1} + * - {http://www.w3.org/2001/04/xmldsig-more#rsa-sha256} + * + * RSA-SHA1 and RSA-SHA256 are acceptable aliases. + * + * - federated_attributes [Optional] + * + * See FederatedAttributesConfig. Any value is allowed for the provider attribute names. + * + * For Twitter, the additional recognized parameters are: + * + * - consumer_key [Required] + * + * The Twitter Consumer Key. Not available if configured globally for Canvas. + * + * - consumer_secret [Required] + * + * The Twitter Consumer Secret. Not available if configured globally for Canvas. + * + * - login_attribute [Optional] + * + * The attribute to use to look up the user's login in Canvas. Either + * 'user_id' (the default), or 'screen_name' + * + * - parent_registration [Optional] - DEPRECATED 2017-11-03 + * + * Accepts a boolean value, true designates the authentication service + * for use on parent registrations. Only one service can be selected + * at a time so if set to true all others will be set to false + * + * - federated_attributes [Optional] + * + * See FederatedAttributesConfig. Valid provider attributes are 'name', + * 'screen_name', 'time_zone', and 'user_id'. + */ +export const addAuthenticationProvider = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/authentication_providers', + ...options + }); +}; + +/** + * Delete authentication provider + * Delete the config + */ +export const deleteAuthenticationProvider = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/authentication_providers/{id}', + ...options + }); +}; + +/** + * Get authentication provider + * Get the specified authentication provider + */ +export const getAuthenticationProvider = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/authentication_providers/{id}', + ...options + }); +}; + +/** + * Update authentication provider + * Update an authentication provider using the same options as the create endpoint. + * You can not update an existing provider to a new authentication type. + */ +export const updateAuthenticationProvider = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/authentication_providers/{id}', + ...options + }); +}; + +/** + * List content migrations + * Returns paginated content migrations + */ +export const listContentMigrationsAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/content_migrations', + ...options + }); +}; + +/** + * Create a content migration + * Create a content migration. If the migration requires a file to be uploaded + * the actual processing of the file will start once the file upload process is completed. + * File uploading works as described in the {file:file_uploads.html File Upload Documentation} + * except that the values are set on a *pre_attachment* sub-hash. + * + * For migrations that don't require a file to be uploaded, like course copy, the + * processing will begin as soon as the migration is created. + * + * You can use the {api:ProgressController#show Progress API} to track the + * progress of the migration. The migration's progress is linked to with the + * _progress_url_ value. + * + * The two general workflows are: + * + * If no file upload is needed: + * + * 1. POST to create + * 2. Use the {api:ProgressController#show Progress} specified in _progress_url_ to monitor progress + * + * For file uploading: + * + * 1. POST to create with file info in *pre_attachment* + * 2. Do {file:file_uploads.html file upload processing} using the data in the *pre_attachment* data + * 3. {api:ContentMigrationsController#show GET} the ContentMigration + * 4. Use the {api:ProgressController#show Progress} specified in _progress_url_ to monitor progress + * + * (required if doing .zip file upload) + */ +export const createContentMigrationAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/content_migrations', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List Migration Systems + * Lists the currently available migration types. These values may change. + */ +export const listMigrationSystemsAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/content_migrations/migrators', + ...options + }); +}; + +/** + * List migration issues + * Returns paginated migration issues + */ +export const listMigrationIssuesAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/content_migrations/{content_migration_id}/migration_issues', + ...options + }); +}; + +/** + * Get a migration issue + * Returns data on an individual migration issue + */ +export const getMigrationIssueAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/content_migrations/{content_migration_id}/migration_issues/{id}', + ...options + }); +}; + +/** + * Update a migration issue + * Update the workflow_state of a migration issue + */ +export const updateMigrationIssueAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/content_migrations/{content_migration_id}/migration_issues/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get a content migration + * Returns data on an individual content migration + */ +export const getContentMigrationAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/content_migrations/{id}', + ...options + }); +}; + +/** + * Update a content migration + * Update a content migration. Takes same arguments as create except that you + * can't change the migration type. However, changing most settings after the + * migration process has started will not do anything. Generally updating the + * content migration will be used when there is a file upload problem. If the + * first upload has a problem you can supply new _pre_attachment_ values to + * start the process again. + */ +export const updateContentMigrationAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/content_migrations/{id}', + ...options + }); +}; + +/** + * Create a new course + * Create a new course + */ +export const createNewCourse = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/courses', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Update courses + * Update multiple courses in an account. Operates asynchronously; use the {api:ProgressController#show progress endpoint} + * to query the status of an operation. + * + * The action to take on each course. Must be one of 'offer', 'conclude', 'delete', or 'undelete'. + * * 'offer' makes a course visible to students. This action is also called "publish" on the web site. + * * 'conclude' prevents future enrollments and makes a course read-only for all participants. The course still appears + * in prior-enrollment lists. + * * 'delete' completely removes the course from the web site (including course menus and prior-enrollment lists). + * All enrollments are deleted. Course content may be physically deleted at a future date. + * * 'undelete' attempts to recover a course that has been deleted. (Recovery is not guaranteed; please conclude + * rather than delete a course if there is any possibility the course will be used again.) The recovered course + * will be unpublished. Deleted enrollments will not be recovered. + */ +export const updateCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/courses', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get a single course + * Return information on a single course. + * + * Accepts the same include[] parameters as the list action plus: + */ +export const getSingleCourseAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/courses/{id}', + ...options + }); +}; + +/** + * Create Tool from ToolConfiguration + * Creates context_external_tool from attached tool_configuration of + * the provided developer_key if not already present in context. + * DeveloperKey must have a ToolConfiguration to create tool or 404 will be raised. + * Will return an existing ContextExternalTool if one already exists. + */ +export const createToolFromToolconfigurationAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/developer_keys/{developer_key_id}/create_tool', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Enrollment by ID + * Get an Enrollment object by Enrollment ID + */ +export const enrollmentById = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/enrollments/{id}', + ...options + }); +}; + +/** + * List external tools + * Returns the paginated list of external tools for the current context. + * See the get request docs for a single tool for a list of properties on an external tool. + */ +export const listExternalToolsAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/external_tools', + ...options + }); +}; + +/** + * Create an external tool + * Create an external tool in the specified course/account. + * The created tool will be returned, see the "show" endpoint for an example. + */ +export const createExternalToolAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/external_tools', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get a sessionless launch url for an external tool. + * Returns a sessionless launch url for an external tool. + * + * NOTE: Either the id or url must be provided unless launch_type is assessment or module_item. + */ +export const getSessionlessLaunchUrlForExternalToolAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/external_tools/sessionless_launch', + ...options + }); +}; + +/** + * Delete an external tool + * Remove the specified external tool + */ +export const deleteExternalToolAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/external_tools/{external_tool_id}', + ...options + }); +}; + +/** + * Get a single external tool + * Returns the specified external tool. + */ +export const getSingleExternalToolAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/external_tools/{external_tool_id}', + ...options + }); +}; + +/** + * Edit an external tool + * Update the specified external tool. Uses same parameters as create + */ +export const editExternalToolAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/external_tools/{external_tool_id}', + ...options + }); +}; + +/** + * List features + * A paginated list of all features that apply to a given Account, Course, or User. + */ +export const listFeaturesAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/features', + ...options + }); +}; + +/** + * List enabled features + * A paginated list of all features that are enabled on a given Account, Course, or User. + * Only the feature names are returned. + */ +export const listEnabledFeaturesAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/features/enabled', + ...options + }); +}; + +/** + * Remove feature flag + * Remove feature flag for a given Account, Course, or User. (Note that the flag must + * be defined on the Account, Course, or User directly.) The object will then inherit + * the feature flags from a higher account, if any exist. If this flag was 'on' or 'off', + * then lower-level account flags that were masked by this one will apply again. + */ +export const removeFeatureFlagAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/features/flags/{feature}', + ...options + }); +}; + +/** + * Get feature flag + * Get the feature flag that applies to a given Account, Course, or User. + * The flag may be defined on the object, or it may be inherited from a parent + * account. You can look at the context_id and context_type of the returned object + * to determine which is the case. If these fields are missing, then the object + * is the global Canvas default. + */ +export const getFeatureFlagAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/features/flags/{feature}', + ...options + }); +}; + +/** + * Set feature flag + * Set a feature flag for a given Account, Course, or User. This call will fail if a parent account sets + * a feature flag for the same feature in any state other than "allowed". + */ +export const setFeatureFlagAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/features/flags/{feature}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List grading periods + * Returns the paginated list of grading periods for the current course. + */ +export const listGradingPeriodsAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/grading_periods', + ...options + }); +}; + +/** + * Delete a grading period + * 204 No Content response code is returned if the deletion was + * successful. + */ +export const deleteGradingPeriodAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/grading_periods/{id}', + ...options + }); +}; + +/** + * List the grading standards available in a context. + * Returns the paginated list of grading standards for the given context that are visible to the user. + */ +export const listGradingStandardsAvailableInContextAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/grading_standards', + ...options + }); +}; + +/** + * Create a new grading standard + * Create a new grading standard + * + * If grading_scheme_entry arguments are omitted, then a default grading scheme + * will be set. The default scheme is as follows: + * "A" : 94, + * "A-" : 90, + * "B+" : 87, + * "B" : 84, + * "B-" : 80, + * "C+" : 77, + * "C" : 74, + * "C-" : 70, + * "D+" : 67, + * "D" : 64, + * "D-" : 61, + * "F" : 0, + */ +export const createNewGradingStandardAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/grading_standards', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get a single grading standard in a context. + * Returns a grading standard for the given context that is visible to the user. + */ +export const getSingleGradingStandardInContextAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/grading_standards/{grading_standard_id}', + ...options + }); +}; + +/** + * List group categories for a context + * Returns a paginated list of group categories in a context + */ +export const listGroupCategoriesForContextAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/group_categories', + ...options + }); +}; + +/** + * Create a Group Category + * Create a new group category + */ +export const createGroupCategoryAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/group_categories', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List the groups available in a context. + * Returns the paginated list of active groups in the given context that are visible to user. + */ +export const listGroupsAvailableInContextAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/groups', + ...options + }); +}; + +/** + * Get help links + * Returns the help links for that account + */ +export const getHelpLinks = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/help_links', + ...options + }); +}; + +/** + * List user logins + * Given a user ID, return a paginated list of that user's logins for the given account. + */ +export const listUserLoginsAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/logins', + ...options + }); +}; + +/** + * Create a user login + * Create a new login for an existing user in the given account. + */ +export const createUserLogin = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/logins', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Edit a user login + * Update an existing login for a user in the given account. + */ +export const editUserLogin = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/logins/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get all outcome links for context + */ +export const getAllOutcomeLinksForContextAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_group_links', + ...options + }); +}; + +/** + * Get all outcome groups for context + */ +export const getAllOutcomeGroupsForContextAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups', + ...options + }); +}; + +/** + * Delete an outcome group + * Deleting an outcome group deletes descendant outcome groups and outcome + * links. The linked outcomes themselves are only deleted if all links to the + * outcome were deleted. + * + * Aligned outcomes cannot be deleted; as such, if all remaining links to an + * aligned outcome are included in this group's descendants, the group + * deletion will fail. + */ +export const deleteOutcomeGroupAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups/{id}', + ...options + }); +}; + +/** + * Show an outcome group + */ +export const showOutcomeGroupAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups/{id}', + ...options + }); +}; + +/** + * Update an outcome group + * Modify an existing outcome group. Fields not provided are left as is; + * unrecognized fields are ignored. + * + * When changing the parent outcome group, the new parent group must belong to + * the same context as this outcome group, and must not be a descendant of + * this outcome group (i.e. no cycles allowed). + */ +export const updateOutcomeGroupAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Import an outcome group + * Creates a new subgroup of the outcome group with the same title and + * description as the source group, then creates links in that new subgroup to + * the same outcomes that are linked in the source group. Recurses on the + * subgroups of the source group, importing them each in turn into the new + * subgroup. + * + * Allows you to copy organizational structure, but does not create copies of + * the outcomes themselves, only new links. + * + * The source group must be either global, from the same context as this + * outcome group, or from an associated account. The source group cannot be + * the root outcome group of its context. + */ +export const importOutcomeGroupAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups/{id}/import', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List linked outcomes + * A paginated list of the immediate OutcomeLink children of the outcome group. + */ +export const listLinkedOutcomesAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups/{id}/outcomes', + ...options + }); +}; + +/** + * Create/link an outcome + * Link an outcome into the outcome group. The outcome to link can either be + * specified by a PUT to the link URL for a specific outcome (the outcome_id + * in the PUT URLs) or by supplying the information for a new outcome (title, + * description, ratings, mastery_points) in a POST to the collection. + * + * If linking an existing outcome, the outcome_id must identify an outcome + * available to this context; i.e. an outcome owned by this group's context, + * an outcome owned by an associated account, or a global outcome. With + * outcome_id present, any other parameters (except move_from) are ignored. + * + * If defining a new outcome, the outcome is created in the outcome group's + * context using the provided title, description, ratings, and mastery points; + * the title is required but all other fields are optional. The new outcome + * is then linked into the outcome group. + * + * If ratings are provided when creating a new outcome, an embedded rubric + * criterion is included in the new outcome. This criterion's mastery_points + * default to the maximum points in the highest rating if not specified in the + * mastery_points parameter. Any ratings lacking a description are given a + * default of "No description". Any ratings lacking a point value are given a + * default of 0. If no ratings are provided, the mastery_points parameter is + * ignored. + */ +export const createLinkOutcomeAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups/{id}/outcomes', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Unlink an outcome + * Unlinking an outcome only deletes the outcome itself if this was the last + * link to the outcome in any group in any context. Aligned outcomes cannot be + * deleted; as such, if this is the last link to an aligned outcome, the + * unlinking will fail. + */ +export const unlinkOutcomeAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups/{id}/outcomes/{outcome_id}', + ...options + }); +}; + +/** + * Create/link an outcome + * Link an outcome into the outcome group. The outcome to link can either be + * specified by a PUT to the link URL for a specific outcome (the outcome_id + * in the PUT URLs) or by supplying the information for a new outcome (title, + * description, ratings, mastery_points) in a POST to the collection. + * + * If linking an existing outcome, the outcome_id must identify an outcome + * available to this context; i.e. an outcome owned by this group's context, + * an outcome owned by an associated account, or a global outcome. With + * outcome_id present, any other parameters (except move_from) are ignored. + * + * If defining a new outcome, the outcome is created in the outcome group's + * context using the provided title, description, ratings, and mastery points; + * the title is required but all other fields are optional. The new outcome + * is then linked into the outcome group. + * + * If ratings are provided when creating a new outcome, an embedded rubric + * criterion is included in the new outcome. This criterion's mastery_points + * default to the maximum points in the highest rating if not specified in the + * mastery_points parameter. Any ratings lacking a description are given a + * default of "No description". Any ratings lacking a point value are given a + * default of 0. If no ratings are provided, the mastery_points parameter is + * ignored. + */ +export const createLinkOutcomeAccountsOutcomeId = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups/{id}/outcomes/{outcome_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List subgroups + * A paginated list of the immediate OutcomeGroup children of the outcome group. + */ +export const listSubgroupsAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups/{id}/subgroups', + ...options + }); +}; + +/** + * Create a subgroup + * Creates a new empty subgroup under the outcome group with the given title + * and description. + */ +export const createSubgroupAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_groups/{id}/subgroups', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Import Outcomes + * Import outcomes into Canvas. + * + * For more information on the format that's expected here, please see the + * "Outcomes CSV" section in the API docs. + */ +export const importOutcomesAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_imports', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get Outcome import status + * Get the status of an already created Outcome import. Pass 'latest' for the outcome import id + * for the latest import. + * + * Examples: + * curl 'https:///api/v1/accounts//outcome_imports/' \ + * -H "Authorization: Bearer " + * curl 'https:///api/v1/courses//outcome_imports/' \ + * -H "Authorization: Bearer " + */ +export const getOutcomeImportStatusAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_imports/{id}', + ...options + }); +}; + +/** + * Get proficiency ratings + * Get account-level proficiency ratings. If not defined for this account, + * it will return proficiency ratings for the nearest super-account with ratings defined. + * Will return 404 if none found. + * + * Examples: + * curl https:///api/v1/accounts//outcome_proficiency \ + * -H 'Authorization: Bearer ' + */ +export const getProficiencyRatings = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_proficiency', + ...options + }); +}; + +/** + * Create/update proficiency ratings + * Create or update account-level proficiency ratings. These ratings will apply to all + * sub-accounts, unless they have their own account-level proficiency ratings defined. + */ +export const createUpdateProficiencyRatings = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/outcome_proficiency', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Permissions + * Returns permission information for the calling user and the given account. + * You may use `self` as the account id to check permissions against the domain root account. + * The caller must have an account role or admin (teacher/TA/designer) enrollment in a course + * in the account. + * + * See also the {api:CoursesController#permissions Course} and {api:GroupsController#permissions Group} + * counterparts. + */ +export const accountPermissions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/accounts/{account_id}/permissions', + ...options + }); +}; + +/** + * List Available Reports + * Returns a paginated list of reports for the current context. + */ +export const listAvailableReports = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/reports', + ...options + }); +}; + +/** + * Index of Reports + * Shows all reports that have been run for the account of a specific type. + */ +export const indexOfReports = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/reports/{report}', + ...options + }); +}; + +/** + * Start a Report + * Generates a report instance for the account. Note that "report" in the + * request must match one of the available report names. To fetch a list of + * available report names and parameters for each report (including whether or + * not those parameters are required), see + * {api:AccountReportsController#available_reports List Available Reports}. + */ +export const startReport = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/reports/{report}', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a Report + * Deletes a generated report instance. + */ +export const deleteReport = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/reports/{report}/{id}', + ...options + }); +}; + +/** + * Status of a Report + * Returns the status of a report. + */ +export const statusOfReport = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/reports/{report}/{id}', + ...options + }); +}; + +/** + * List roles + * A paginated list of the roles available to an account. + */ +export const listRoles = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/roles', + ...options + }); +}; + +/** + * Create a new role + * Create a new course-level or account-level role. + */ +export const createNewRole = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/roles', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Deactivate a role + * Deactivates a custom role. This hides it in the user interface and prevents it + * from being assigned to new users. Existing users assigned to the role will + * continue to function with the same permissions they had previously. + * Built-in roles cannot be deactivated. + */ +export const deactivateRole = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/roles/{id}', + ...options + }); +}; + +/** + * Get a single role + * Retrieve information about a single role + */ +export const getSingleRole = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/roles/{id}', + ...options + }); +}; + +/** + * Update a role + * Update permissions for an existing role. + * + * Recognized roles are: + * * TeacherEnrollment + * * StudentEnrollment + * * TaEnrollment + * * ObserverEnrollment + * * DesignerEnrollment + * * AccountAdmin + * * Any previously created custom role + */ +export const updateRole = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/roles/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Activate a role + * Re-activates an inactive role (allowing it to be assigned to new users) + */ +export const activateRole = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/roles/{id}/activate', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Redirect to root outcome group for context + * Convenience redirect to find the root outcome group for a particular + * context. Will redirect to the appropriate outcome group's URL. + */ +export const redirectToRootOutcomeGroupForContextAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/root_outcome_group', + ...options + }); +}; + +/** + * List rubrics + * Returns the paginated list of active rubrics for the current context. + */ +export const listRubricsAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/rubrics', + ...options + }); +}; + +/** + * Get a single rubric + * Returns the rubric with the given id. + */ +export const getSingleRubricAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/rubrics/{id}', + ...options + }); +}; + +/** + * List scopes + * A list of scopes that can be applied to developer keys and access tokens. + */ +export const listScopes = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/scopes', + ...options + }); +}; + +/** + * Self register a user + * Self register and return a new user and pseudonym for an account. + * + * If self-registration is enabled on the account, you can use this + * endpoint to self register new users. + */ +export const selfRegisterUser = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/self_registration', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Share a BrandConfig (Theme) + * Create a SharedBrandConfig, which will give the given brand_config a name + * and make it available to other users of this account. + */ +export const shareBrandconfigTheme = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/shared_brand_configs', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Update a shared theme + * Update the specified shared_brand_config with a new name or to point to a new brand_config. + * Uses same parameters as create. + */ +export const updateSharedTheme = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/shared_brand_configs/{id}', + ...options + }); +}; + +/** + * Get SIS import error list + * Returns the list of SIS import errors for an account or a SIS import. Import + * errors are only stored for 30 days. + * + * Example: + * curl 'https:///api/v1/accounts//sis_imports//sis_import_errors' \ + * -H "Authorization: Bearer " + * + * Example: + * curl 'https:///api/v1/accounts//sis_import_errors' \ + * -H "Authorization: Bearer " + */ +export const getSisImportErrorListSisImportErrors = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sis_import_errors', + ...options + }); +}; + +/** + * Get SIS import list + * Returns the list of SIS imports for an account + * + * Example: + * curl https:///api/v1/accounts//sis_imports \ + * -H 'Authorization: Bearer ' + */ +export const getSisImportList = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sis_imports', + ...options + }); +}; + +/** + * Import SIS data + * Import SIS data into Canvas. Must be on a root account with SIS imports + * enabled. + * + * For more information on the format that's expected here, please see the + * "SIS CSV" section in the API docs. + */ +export const importSisData = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sis_imports', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Abort all pending SIS imports + * Abort already created but not processed or processing SIS imports. + */ +export const abortAllPendingSisImports = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sis_imports/abort_all_pending', + ...options + }); +}; + +/** + * Get SIS import status + * Get the status of an already created SIS import. + * + * Examples: + * curl https:///api/v1/accounts//sis_imports/ \ + * -H 'Authorization: Bearer ' + */ +export const getSisImportStatus = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sis_imports/{id}', + ...options + }); +}; + +/** + * Abort SIS import + * Abort a SIS import that has not completed. + */ +export const abortSisImport = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sis_imports/{id}/abort', + ...options + }); +}; + +/** + * Get SIS import error list + * Returns the list of SIS import errors for an account or a SIS import. Import + * errors are only stored for 30 days. + * + * Example: + * curl 'https:///api/v1/accounts//sis_imports//sis_import_errors' \ + * -H "Authorization: Bearer " + * + * Example: + * curl 'https:///api/v1/accounts//sis_import_errors' \ + * -H "Authorization: Bearer " + */ +export const getSisImportErrorListSisImports = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sis_imports/{id}/errors', + ...options + }); +}; + +/** + * Restore workflow_states of SIS imported items + * This will restore the the workflow_state for all the items that changed + * their workflow_state during the import being restored. + * This will restore states for items imported with the following importers: + * accounts.csv terms.csv courses.csv sections.csv group_categories.csv + * groups.csv users.csv admins.csv + * This also restores states for other items that changed during the import. + * An example would be if an enrollment was deleted from a sis import and the + * group_membership was also deleted as a result of the enrollment deletion, + * both items would be restored when the sis batch is restored. + */ +export const restoreWorkflowStatesOfSisImportedItems = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sis_imports/{id}/restore_states', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * show account auth settings + * The way to get the current state of each account level setting + * that's relevant to Single Sign On configuration + * + * You can list the current state of each setting with "update_sso_settings" + */ +export const showAccountAuthSettings = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sso_settings', + ...options + }); +}; + +/** + * update account auth settings + * For various cases of mixed SSO configurations, you may need to set some + * configuration at the account level to handle the particulars of your + * setup. + * + * This endpoint accepts a PUT request to set several possible account + * settings. All setting are optional on each request, any that are not + * provided at all are simply retained as is. Any that provide the key but + * a null-ish value (blank string, null, undefined) will be UN-set. + * + * You can list the current state of each setting with "show_sso_settings" + */ +export const updateAccountAuthSettings = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sso_settings', + ...options + }); +}; + +/** + * Get the sub-accounts of an account + * List accounts that are sub-accounts of the given account. + */ +export const getSubAccountsOfAccount = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sub_accounts', + ...options + }); +}; + +/** + * Create a new sub-account + * Add a new sub-account to a given account. + */ +export const createNewSubAccount = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sub_accounts', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a sub-account + * Cannot delete an account with active courses or active sub_accounts. + * Cannot delete a root_account + */ +export const deleteSubAccount = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/sub_accounts/{id}', + ...options + }); +}; + +/** + * List enrollment terms + * A paginated list of all of the terms in the account. + */ +export const listEnrollmentTerms = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/terms', + ...options + }); +}; + +/** + * Create enrollment term + * Create a new enrollment term for the specified account. + */ +export const createEnrollmentTerm = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/terms', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete enrollment term + * Delete the specified enrollment term. + */ +export const deleteEnrollmentTerm = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/terms/{id}', + ...options + }); +}; + +/** + * Update enrollment term + * Update an existing enrollment term for the specified account. + */ +export const updateEnrollmentTerm = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/terms/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get the Terms of Service + * Returns the terms of service for that account + */ +export const getTermsOfService = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/terms_of_service', + ...options + }); +}; + +/** + * List users in account + * A paginated list of of users associated with this account. + * + * @example_request + * curl https:///api/v1/accounts/self/users?search_term= \ + * -X GET \ + * -H 'Authorization: Bearer ' + */ +export const listUsersInAccount = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/users', + ...options + }); +}; + +/** + * Create a user + * Create and return a new user and pseudonym for an account. + * + * If you don't have the "Modify login details for users" permission, but + * self-registration is enabled on the account, you can still use this + * endpoint to register new users. Certain fields will be required, and + * others will be ignored (see below). + */ +export const createUser = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/users', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a user from the root account + * Delete a user record from a Canvas root account. If a user is associated + * with multiple root accounts (in a multi-tenant instance of Canvas), this + * action will NOT remove them from the other accounts. + * + * WARNING: This API will allow a user to remove themselves from the account. + * If they do this, they won't be able to make API calls or log into Canvas at + * that account. + */ +export const deleteUserFromRootAccount = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{account_id}/users/{user_id}', + ...options + }); +}; + +/** + * Get a single account + * Retrieve information on an individual account, given by id or sis + * sis_account_id. + */ +export const getSingleAccount = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{id}', + ...options + }); +}; + +/** + * Update an account + * Update an existing account. + */ +export const updateAccount = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/accounts/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List announcements + * Returns the paginated list of announcements for the given courses and date range. Note that + * a +context_code+ field is added to the responses so you can tell which course each announcement + * belongs to. + */ +export const listAnnouncements = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/announcements', + ...options + }); +}; + +/** + * List appointment groups + * Retrieve the paginated list of appointment groups that can be reserved or + * managed by the current user. + */ +export const listAppointmentGroups = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/appointment_groups', + ...options + }); +}; + +/** + * Create an appointment group + * Create and return a new appointment group. If new_appointments are + * specified, the response will return a new_appointments array (same format + * as appointments array, see "List appointment groups" action) + */ +export const createAppointmentGroup = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/appointment_groups', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get next appointment + * Return the next appointment available to sign up for. The appointment + * is returned in a one-element array. If no future appointments are + * available, an empty array is returned. + */ +export const getNextAppointment = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/appointment_groups/next_appointment', + ...options + }); +}; + +/** + * Delete an appointment group + * Delete an appointment group (and associated time slots and reservations) + * and return the deleted group + */ +export const deleteAppointmentGroup = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/appointment_groups/{id}', + ...options + }); +}; + +/** + * Get a single appointment group + * Returns information for a single appointment group + */ +export const getSingleAppointmentGroup = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/appointment_groups/{id}', + ...options + }); +}; + +/** + * Update an appointment group + * Update and return an appointment group. If new_appointments are specified, + * the response will return a new_appointments array (same format as + * appointments array, see "List appointment groups" action). + */ +export const updateAppointmentGroup = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/appointment_groups/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List student group participants + * A paginated list of student groups that are (or may be) participating in + * this appointment group. Refer to the Groups API for the response fields. + * Returns no results for appointment groups with the "User" participant_type. + */ +export const listStudentGroupParticipants = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/appointment_groups/{id}/groups', + ...options + }); +}; + +/** + * List user participants + * A paginated list of users that are (or may be) participating in this + * appointment group. Refer to the Users API for the response fields. Returns + * no results for appointment groups with the "Group" participant_type. + */ +export const listUserParticipants = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/appointment_groups/{id}/users', + ...options + }); +}; + +/** + * Query by account. + * List authentication events for a given account. + */ +export const queryByAccount = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/audit/authentication/accounts/{account_id}', + ...options + }); +}; + +/** + * Query by login. + * List authentication events for a given login. + */ +export const queryByLogin = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/audit/authentication/logins/{login_id}', + ...options + }); +}; + +/** + * Query by user. + * List authentication events for a given user. + */ +export const queryByUser = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/audit/authentication/users/{user_id}', + ...options + }); +}; + +/** + * Query by course. + * List course change events for a given course. + */ +export const queryByCourse = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/audit/course/courses/{course_id}', + ...options + }); +}; + +/** + * Query by assignment. + * List grade change events for a given assignment. + */ +export const queryByAssignment = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/audit/grade_change/assignments/{assignment_id}', + ...options + }); +}; + +/** + * Query by course. + * List grade change events for a given course. + */ +export const queryByCourseGradeChange = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/audit/grade_change/courses/{course_id}', + ...options + }); +}; + +/** + * Query by grader. + * List grade change events for a given grader. + */ +export const queryByGrader = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/audit/grade_change/graders/{grader_id}', + ...options + }); +}; + +/** + * Query by student. + * List grade change events for a given student. + */ +export const queryByStudent = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/audit/grade_change/students/{student_id}', + ...options + }); +}; + +/** + * Get the brand config variables that should be used for this domain + * Will redirect to a static json file that has all of the brand + * variables used by this account. Even though this is a redirect, + * do not store the redirected url since if the account makes any changes + * it will redirect to a new url. Needs no authentication. + */ +export const getBrandConfigVariablesThatShouldBeUsedForThisDomain = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/brand_variables', + ...options + }); +}; + +/** + * List calendar events + * Retrieve the paginated list of calendar events or assignments for the current user + */ +export const listCalendarEvents = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/calendar_events', + ...options + }); +}; + +/** + * Create a calendar event + * Create and return a new calendar event + */ +export const createCalendarEvent = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/calendar_events', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a calendar event + * Delete an event from the calendar and return the deleted event + */ +export const deleteCalendarEvent = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/calendar_events/{id}', + ...options + }); +}; + +/** + * Get a single calendar event or assignment + */ +export const getSingleCalendarEventOrAssignment = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/calendar_events/{id}', + ...options + }); +}; + +/** + * Update a calendar event + * Update and return a calendar event + */ +export const updateCalendarEvent = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/calendar_events/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Reserve a time slot + * Reserves a particular time slot and return the new reservation + */ +export const reserveTimeSlot = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/calendar_events/{id}/reservations', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Reserve a time slot + * Reserves a particular time slot and return the new reservation + */ +export const reserveTimeSlotParticipantId = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/calendar_events/{id}/reservations/{participant_id}', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List members of a collaboration. + * A paginated list of the collaborators of a given collaboration + */ +export const listMembersOfCollaboration = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/collaborations/{id}/members', + ...options + }); +}; + +/** + * List of CommMessages for a user + * Retrieve a paginated list of messages sent to a user. + */ +export const listOfCommmessagesForUser = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/comm_messages', + ...options + }); +}; + +/** + * List conversations + * Returns the paginated list of conversations for the current user, most + * recent ones first. + */ +export const listConversations = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/conversations', + ...options + }); +}; + +/** + * Create a conversation + * Create a new conversation with one or more recipients. If there is already + * an existing private conversation with the given recipients, it will be + * reused. + */ +export const createConversation = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/conversations', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Batch update conversations + * Perform a change on a set of conversations. Operates asynchronously; use the {api:ProgressController#show progress endpoint} + * to query the status of an operation. + */ +export const batchUpdateConversations = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/conversations', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get running batches + * Returns any currently running conversation batches for the current user. + * Conversation batches are created when a bulk private message is sent + * asynchronously (see the mode argument to the {api:ConversationsController#create create API action}). + */ +export const getRunningBatches = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/conversations/batches', + ...options + }); +}; + +/** + * Find recipients + * Find valid recipients (users, courses and groups) that the current user + * can send messages to. The /api/v1/search/recipients path is the preferred + * endpoint, /api/v1/conversations/find_recipients is deprecated. + * + * Pagination is supported. + */ +export const findRecipientsConversations = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/conversations/find_recipients', + ...options + }); +}; + +/** + * Mark all as read + * Mark all conversations as read. + */ +export const markAllAsRead = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/conversations/mark_all_as_read', + ...options + }); +}; + +/** + * Unread count + * Get the number of unread conversations for the current user + */ +export const unreadCount = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/conversations/unread_count', + ...options + }); +}; + +/** + * Delete a conversation + * Delete this conversation and its messages. Note that this only deletes + * this user's view of the conversation. + * + * Response includes same fields as UPDATE action + */ +export const deleteConversation = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/conversations/{id}', + ...options + }); +}; + +/** + * Get a single conversation + * Returns information for a single conversation for the current user. Response includes all + * fields that are present in the list/index action as well as messages + * and extended participant information. + */ +export const getSingleConversation = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/conversations/{id}', + ...options + }); +}; + +/** + * Edit a conversation + * Updates attributes for a single conversation. + */ +export const editConversation = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/conversations/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Add a message + * Add a message to an existing conversation. Response is similar to the + * GET/show action, except that only includes the + * latest message (i.e. what we just sent) + * + * An array of user ids. Defaults to all of the current conversation + * recipients. To explicitly send a message to no other recipients, + * this array should consist of the logged-in user id. + * + * An array of message ids from this conversation to send to recipients + * of the new message. Recipients who already had a copy of included + * messages will not be affected. + */ +export const addMessage = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/conversations/{id}/add_message', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Add recipients + * Add recipients to an existing group conversation. Response is similar to + * the GET/show action, except that only includes the + * latest message (e.g. "joe was added to the conversation by bob") + */ +export const addRecipients = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/conversations/{id}/add_recipients', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a message + * Delete messages from this conversation. Note that this only affects this + * user's view of the conversation. If all messages are deleted, the + * conversation will be as well (equivalent to DELETE) + */ +export const deleteMessage = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/conversations/{id}/remove_messages', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List accounts for course admins + * A paginated list of accounts that the current user can view through their + * admin course enrollments. (Teacher, TA, or designer enrollments). + * Only returns "id", "name", "workflow_state", "root_account_id" and "parent_account_id" + */ +export const listAccountsForCourseAdmins = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/course_accounts', + ...options + }); +}; + +/** + * List your courses + * Returns the paginated list of active courses for the current user. + */ +export const listYourCourses = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses', + ...options + }); +}; + +/** + * Course activity stream + * Returns the current user's course-specific activity stream, paginated. + * + * For full documentation, see the API documentation for the user activity + * stream, in the user api. + */ +export const courseActivityStream = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/activity_stream', + ...options + }); +}; + +/** + * Course activity stream summary + * Returns a summary of the current user's course-specific activity stream. + * + * For full documentation, see the API documentation for the user activity + * stream summary, in the user api. + */ +export const courseActivityStreamSummary = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/activity_stream/summary', + ...options + }); +}; + +/** + * Get course-level participation data + * Returns page view hits and participation numbers grouped by day through the + * entire history of the course. Page views is returned as a hash, where the + * hash keys are dates in the format "YYYY-MM-DD". The page_views result set + * includes page views broken out by access category. Participations is + * returned as an array of dates in the format "YYYY-MM-DD". + */ +export const getCourseLevelParticipationData = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/analytics/activity', + ...options + }); +}; + +/** + * Get course-level assignment data + * Returns a list of assignments for the course sorted by due date. For + * each assignment returns basic assignment information, the grade breakdown, + * and a breakdown of on-time/late status of homework submissions. + */ +export const getCourseLevelAssignmentData = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/analytics/assignments', + ...options + }); +}; + +/** + * Get course-level student summary data + * Returns a summary of per-user access information for all students in + * a course. This includes total page views, total participations, and a + * breakdown of on-time/late status for all homework submissions in the course. + * + * Each student's summary also includes the maximum number of page views and + * participations by any student in the course, which may be useful for some + * visualizations (since determining maximums client side can be tricky with + * pagination). + */ +export const getCourseLevelStudentSummaryData = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/analytics/student_summaries', + ...options + }); +}; + +/** + * Get user-in-a-course-level participation data + * Returns page view hits grouped by hour, and participation details through the + * entire history of the course. + * + * `page_views` are returned as a hash, where the keys are iso8601 dates, bucketed by the hour. + * `participations` are returned as an array of hashes, sorted oldest to newest. + */ +export const getUserInACourseLevelParticipationData = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/analytics/users/{student_id}/activity', + ...options + }); +}; + +/** + * Get user-in-a-course-level assignment data + * Returns a list of assignments for the course sorted by due date. For + * each assignment returns basic assignment information, the grade breakdown + * (including the student's actual grade), and the basic submission + * information for the student's submission if it exists. + */ +export const getUserInACourseLevelAssignmentData = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/analytics/users/{student_id}/assignments', + ...options + }); +}; + +/** + * Get user-in-a-course-level messaging data + * Returns messaging "hits" grouped by day through the entire history of the + * course. Returns a hash containing the number of instructor-to-student messages, + * and student-to-instructor messages, where the hash keys are dates + * in the format "YYYY-MM-DD". Message hits include Conversation messages and + * comments on homework submissions. + */ +export const getUserInACourseLevelMessagingData = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/analytics/users/{student_id}/communication', + ...options + }); +}; + +/** + * List assignment groups + * Returns the paginated list of assignment groups for the current context. + * The returned groups are sorted by their position field. + */ +export const listAssignmentGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignment_groups', + ...options + }); +}; + +/** + * Create an Assignment Group + * Create a new assignment group for this course. + */ +export const createAssignmentGroup = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignment_groups', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Destroy an Assignment Group + * Deletes the assignment group with the given id. + */ +export const destroyAssignmentGroup = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignment_groups/{assignment_group_id}', + ...options + }); +}; + +/** + * Get an Assignment Group + * Returns the assignment group with the given id. + */ +export const getAssignmentGroup = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignment_groups/{assignment_group_id}', + ...options + }); +}; + +/** + * Edit an Assignment Group + * Modify an existing Assignment Group. + * Accepts the same parameters as Assignment Group creation + */ +export const editAssignmentGroup = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignment_groups/{assignment_group_id}', + ...options + }); +}; + +/** + * List assignments + * Returns the paginated list of assignments for the current context. + */ +export const listAssignments = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/assignments', + ...options + }); +}; + +/** + * Create an assignment + * Create a new assignment for this course. The assignment is created in the + * active state. + */ +export const createAssignment = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List multiple assignments gradeable students + * A paginated list of students eligible to submit a list of assignments. The caller must have + * permission to view grades for the requested course. + * + * Section-limited instructors will only see students in their own sections. + */ +export const listMultipleAssignmentsGradeableStudents = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/assignments/gradeable_students', + ...options + }); +}; + +/** + * Batch retrieve overrides in a course + * Returns a list of specified overrides in this course, providing + * they target sections/groups/students visible to the current user. + * Returns null elements in the list for requests that were not found. + */ +export const batchRetrieveOverridesInCourse = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/assignments/overrides', + ...options + }); +}; + +/** + * Batch create overrides in a course + * Creates the specified overrides for each assignment. Handles creation in a + * transaction, so all records are created or none are. + * + * One of student_ids, group_id, or course_section_id must be present. At most + * one should be present; if multiple are present only the most specific + * (student_ids first, then group_id, then course_section_id) is used and any + * others are ignored. + * + * Errors are reported in an errors attribute, an array of errors corresponding + * to inputs. Global errors will be reported as a single element errors array + */ +export const batchCreateOverridesInCourse = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/overrides', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Batch update overrides in a course + * Updates a list of specified overrides for each assignment. Handles overrides + * in a transaction, so either all updates are applied or none. + * See {api:AssignmentOverridesController#update Update an assignment override} for + * available attributes. + * + * All current overridden values must be supplied if they are to be retained; + * e.g. if due_at was overridden, but this PUT omits a value for due_at, + * due_at will no longer be overridden. If the override is adhoc and + * student_ids is not supplied, the target override set is unchanged. Target + * override sets cannot be changed for group or section overrides. + * + * Errors are reported in an errors attribute, an array of errors corresponding + * to inputs. Global errors will be reported as a single element errors array + */ +export const batchUpdateOverridesInCourse = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/overrides', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Show provisional grade status for a student + * Determine whether or not the student's submission needs one or more provisional grades. + */ +export const showProvisionalGradeStatusForStudentAnonymous = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/anonymous_provisional_grades/status', + ...options + }); +}; + +/** + * List gradeable students + * A paginated list of students eligible to submit the assignment. The caller must have permission to view grades. + * + * Section-limited instructors will only see students in their own sections. + * + * returns [UserDisplay] + */ +export const listGradeableStudents = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/gradeable_students', + ...options + }); +}; + +/** + * List students selected for moderation + * Returns a paginated list of students selected for moderation + */ +export const listStudentsSelectedForModeration = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/moderated_students', + ...options + }); +}; + +/** + * Select students for moderation + * Returns an array of users that were selected for moderation + */ +export const selectStudentsForModeration = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/moderated_students', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List assignment overrides + * Returns the paginated list of overrides for this assignment that target + * sections/groups/students visible to the current user. + */ +export const listAssignmentOverrides = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/overrides', + ...options + }); +}; + +/** + * Create an assignment override + * One of student_ids, group_id, or course_section_id must be present. At most + * one should be present; if multiple are present only the most specific + * (student_ids first, then group_id, then course_section_id) is used and any + * others are ignored. + */ +export const createAssignmentOverride = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/overrides', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete an assignment override + * Deletes an override and returns its former details. + */ +export const deleteAssignmentOverride = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/overrides/{id}', + ...options + }); +}; + +/** + * Get a single assignment override + * Returns details of the the override with the given id. + */ +export const getSingleAssignmentOverride = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/overrides/{id}', + ...options + }); +}; + +/** + * Update an assignment override + * All current overridden values must be supplied if they are to be retained; + * e.g. if due_at was overridden, but this PUT omits a value for due_at, + * due_at will no longer be overridden. If the override is adhoc and + * student_ids is not supplied, the target override set is unchanged. Target + * override sets cannot be changed for group or section overrides. + */ +export const updateAssignmentOverride = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/overrides/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get all Peer Reviews + * Get a list of all Peer Reviews for this assignment + */ +export const getAllPeerReviewsCoursesPeerReviews = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/peer_reviews', + ...options + }); +}; + +/** + * Bulk select provisional grades + * Choose which provisional grades will be received by associated students for an assignment. + * The caller must be the final grader for the assignment or an admin with :select_final_grade rights. + */ +export const bulkSelectProvisionalGrades = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/bulk_select', + ...options + }); +}; + +/** + * Publish provisional grades for an assignment + * Publish the selected provisional grade for all submissions to an assignment. + * Use the "Select provisional grade" endpoint to choose which provisional grade to publish + * for a particular submission. + * + * Students not in the moderation set will have their one and only provisional grade published. + * + * WARNING: This is irreversible. This will overwrite existing grades in the gradebook. + */ +export const publishProvisionalGradesForAssignment = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/publish', + ...options + }); +}; + +/** + * Show provisional grade status for a student + * Tell whether the student's submission needs one or more provisional grades. + */ +export const showProvisionalGradeStatusForStudent = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/status', + ...options + }); +}; + +/** + * Copy provisional grade + * Given a provisional grade, copy the grade (and associated submission comments and rubric assessments) + * to a "final" mark which can be edited or commented upon by a moderator prior to publication of grades. + * + * Notes: + * * The student must be in the moderation set for the assignment. + * * The newly created grade will be selected. + * * The caller must have "Moderate Grades" rights in the course. + */ +export const copyProvisionalGrade = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/{provisional_grade_id}/copy_to_final_mark', + ...options + }); +}; + +/** + * Select provisional grade + * Choose which provisional grade the student should receive for a submission. + * The caller must be the final grader for the assignment or an admin with :select_final_grade rights. + */ +export const selectProvisionalGrade = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/{provisional_grade_id}/select', + ...options + }); +}; + +/** + * Submission Summary + * Returns the number of submissions for the given assignment based on gradeable students + * that fall into three categories: graded, ungraded, not submitted. + */ +export const submissionSummaryCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submission_summary', + ...options + }); +}; + +/** + * List assignment submissions + * A paginated list of all existing submissions for an assignment. + */ +export const listAssignmentSubmissionsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions', + ...options + }); +}; + +/** + * Submit an assignment + * Make a submission for an assignment. You must be enrolled as a student in + * the course/section to do this. + * + * All online turn-in submission types are supported in this API. However, + * there are a few things that are not yet supported: + * + * * Files can be submitted based on a file ID of a user or group file. However, there is no API yet for listing the user and group files, or uploading new files via the API. A file upload API is coming soon. + * * Media comments can be submitted, however, there is no API yet for creating a media comment to submit. + * * Integration with Google Docs is not yet supported. + */ +export const submitAssignmentCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Grade or comment on multiple submissions + * Update the grading and comments on multiple student's assignment + * submissions in an asynchronous job. + * + * The user must have permission to manage grades in the appropriate context + * (course or section). + */ +export const gradeOrCommentOnMultipleSubmissionsCoursesAssignments = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/update_grades', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete Peer Review + * Delete a peer review for the assignment + */ +export const deletePeerReviewCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews', + ...options + }); +}; + +/** + * Get all Peer Reviews + * Get a list of all Peer Reviews for this assignment + */ +export const getAllPeerReviewsCoursesSubmissions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews', + ...options + }); +}; + +/** + * Create Peer Review + * Create a peer review for the assignment + */ +export const createPeerReviewCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get a single submission + * Get a single submission, based on user id. + */ +export const getSingleSubmissionCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}', + ...options + }); +}; + +/** + * Grade or comment on a submission + * Comment on and/or update the grading for a student's assignment submission. If any submission or rubric_assessment arguments are provided, the user must have permission to manage grades in the appropriate context (course or section). + */ +export const gradeOrCommentOnSubmissionCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Upload a file + * Upload a file to attach to a submission comment + * + * See the {file:file_uploads.html File Upload Documentation} for details on the file upload workflow. + * + * The final step of the file upload workflow will return the attachment data, + * including the new file id. The caller can then PUT the file_id to the + * submission API to attach it to a comment + */ +export const uploadFileToSubmission = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}/comments/files', + ...options + }); +}; + +/** + * Upload a file + * Upload a file to a submission. + * + * This API endpoint is the first step in uploading a file to a submission as a student. + * See the {file:file_uploads.html File Upload Documentation} for details on the file upload workflow. + * + * The final step of the file upload workflow will return the attachment data, + * including the new file id. The caller can then POST to submit the + * +online_upload+ assignment with these file ids. + */ +export const uploadFileCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}/files', + ...options + }); +}; + +/** + * Mark submission as unread + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markSubmissionAsUnreadCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}/read', + ...options + }); +}; + +/** + * Mark submission as read + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markSubmissionAsReadCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}/read', + ...options + }); +}; + +/** + * Delete an assignment + * Delete the given assignment. + */ +export const deleteAssignment = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{id}', + ...options + }); +}; + +/** + * Get a single assignment + * Returns the assignment with the given id. + */ +export const getSingleAssignment = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{id}', + ...options + }); +}; + +/** + * Edit an assignment + * Modify an existing assignment. + * + * If the assignment [assignment_overrides] key is absent, any existing + * overrides are kept as is. If the assignment [assignment_overrides] key is + * present, existing overrides are updated or deleted (and new ones created, + * as necessary) to match the provided list. + */ +export const editAssignment = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/assignments/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List blueprint subscriptions + * Returns a list of blueprint subscriptions for the given course. (Currently a course may have no more than one.) + */ +export const listBlueprintSubscriptions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_subscriptions', + ...options + }); +}; + +/** + * List blueprint imports + * Shows a paginated list of migrations imported into a course associated with a blueprint, starting with the most recent. See also + * {api:MasterCourses::MasterTemplatesController#migrations_index the blueprint course side}. + * + * Use 'default' as the subscription_id to use the currently active blueprint subscription. + */ +export const listBlueprintImports = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_subscriptions/{subscription_id}/migrations', + ...options + }); +}; + +/** + * Show a blueprint import + * Shows the status of an import into a course associated with a blueprint. See also + * {api:MasterCourses::MasterTemplatesController#migrations_show the blueprint course side}. + */ +export const showBlueprintImport = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_subscriptions/{subscription_id}/migrations/{id}', + ...options + }); +}; + +/** + * Get import details + * Show the changes that were propagated to a course associated with a blueprint. See also + * {api:MasterCourses::MasterTemplatesController#migration_details the blueprint course side}. + */ +export const getImportDetails = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_subscriptions/{subscription_id}/migrations/{id}/details', + ...options + }); +}; + +/** + * Get blueprint information + * Using 'default' as the template_id should suffice for the current implmentation (as there should be only one template per course). + * However, using specific template ids may become necessary in the future + */ +export const getBlueprintInformation = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}', + ...options + }); +}; + +/** + * Get associated course information + * Returns a list of courses that are configured to receive updates from this blueprint + */ +export const getAssociatedCourseInformation = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/associated_courses', + ...options + }); +}; + +/** + * List blueprint migrations + * Shows a paginated list of migrations for the template, starting with the most recent. This endpoint can be called on a + * blueprint course. See also {api:MasterCourses::MasterTemplatesController#imports_index the associated course side}. + */ +export const listBlueprintMigrations = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations', + ...options + }); +}; + +/** + * Begin a migration to push to associated courses + * Begins a migration to push recently updated content to all associated courses. + * Only one migration can be running at a time. + */ +export const beginMigrationToPushToAssociatedCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Show a blueprint migration + * Shows the status of a migration. This endpoint can be called on a blueprint course. See also + * {api:MasterCourses::MasterTemplatesController#imports_show the associated course side}. + */ +export const showBlueprintMigration = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations/{id}', + ...options + }); +}; + +/** + * Get migration details + * Show the changes that were propagated in a blueprint migration. This endpoint can be called on a + * blueprint course. See also {api:MasterCourses::MasterTemplatesController#import_details the associated course side}. + */ +export const getMigrationDetails = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations/{id}/details', + ...options + }); +}; + +/** + * Set or remove restrictions on a blueprint course object + * If a blueprint course object is restricted, editing will be limited for copies in associated courses. + */ +export const setOrRemoveRestrictionsOnBlueprintCourseObject = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/restrict_item', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get unsynced changes + * Retrieve a list of learning objects that have changed since the last blueprint sync operation. + */ +export const getUnsyncedChanges = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/unsynced_changes', + ...options + }); +}; + +/** + * Update associated courses + * Send a list of course ids to add or remove new associations for the template. + * Cannot add courses that do not belong to the blueprint course's account. Also cannot add + * other blueprint courses or courses that already have an association with another blueprint course. + */ +export const updateAssociatedCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/update_associations', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get course timetable + * Returns the last timetable set by the + * {api:CalendarEventsApiController#set_course_timetable Set a course timetable} endpoint + */ +export const getCourseTimetable = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/calendar_events/timetable', + ...options + }); +}; + +/** + * Set a course timetable + * Creates and updates "timetable" events for a course. + * Can automaticaly generate a series of calendar events based on simple schedules + * (e.g. "Monday and Wednesday at 2:00pm" ) + * + * Existing timetable events for the course and course sections + * will be updated if they still are part of the timetable. + * Otherwise, they will be deleted. + */ +export const setCourseTimetable = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/calendar_events/timetable', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Create or update events directly for a course timetable + * Creates and updates "timetable" events for a course or course section. + * Similar to {api:CalendarEventsApiController#set_course_timetable setting a course timetable}, + * but instead of generating a list of events based on a timetable schedule, + * this endpoint expects a complete list of events. + */ +export const createOrUpdateEventsDirectlyForCourseTimetable = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/calendar_events/timetable_events', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List collaborations + * A paginated list of collaborations the current user has access to in the + * context of the course provided in the url. NOTE: this only returns + * ExternalToolCollaboration type collaborations. + * + * curl https:///api/v1/courses/1/collaborations/ + */ +export const listCollaborationsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/collaborations', + ...options + }); +}; + +/** + * List conferences + * Retrieve the paginated list of conferences for this context + * + * This API returns a JSON object containing the list of conferences, + * the key for the list of conferences is "conferences" + */ +export const listConferencesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/conferences', + ...options + }); +}; + +/** + * List content exports + * A paginated list of the past and pending content export jobs for a course, + * group, or user. Exports are returned newest first. + */ +export const listContentExportsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_exports', + ...options + }); +}; + +/** + * Export content + * Begin a content export job for a course, group, or user. + * + * You can use the {api:ProgressController#show Progress API} to track the + * progress of the export. The migration's progress is linked to with the + * _progress_url_ value. + * + * When the export completes, use the {api:ContentExportsApiController#show Show content export} endpoint + * to retrieve a download URL for the exported content. + */ +export const exportContentCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_exports', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Show content export + * Get information about a single content export. + */ +export const showContentExportCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_exports/{id}', + ...options + }); +}; + +/** + * List licenses + * A paginated list of licenses that can be applied + */ +export const listLicensesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_licenses', + ...options + }); +}; + +/** + * List content migrations + * Returns paginated content migrations + */ +export const listContentMigrationsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_migrations', + ...options + }); +}; + +/** + * Create a content migration + * Create a content migration. If the migration requires a file to be uploaded + * the actual processing of the file will start once the file upload process is completed. + * File uploading works as described in the {file:file_uploads.html File Upload Documentation} + * except that the values are set on a *pre_attachment* sub-hash. + * + * For migrations that don't require a file to be uploaded, like course copy, the + * processing will begin as soon as the migration is created. + * + * You can use the {api:ProgressController#show Progress API} to track the + * progress of the migration. The migration's progress is linked to with the + * _progress_url_ value. + * + * The two general workflows are: + * + * If no file upload is needed: + * + * 1. POST to create + * 2. Use the {api:ProgressController#show Progress} specified in _progress_url_ to monitor progress + * + * For file uploading: + * + * 1. POST to create with file info in *pre_attachment* + * 2. Do {file:file_uploads.html file upload processing} using the data in the *pre_attachment* data + * 3. {api:ContentMigrationsController#show GET} the ContentMigration + * 4. Use the {api:ProgressController#show Progress} specified in _progress_url_ to monitor progress + * + * (required if doing .zip file upload) + */ +export const createContentMigrationCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_migrations', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List Migration Systems + * Lists the currently available migration types. These values may change. + */ +export const listMigrationSystemsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_migrations/migrators', + ...options + }); +}; + +/** + * List migration issues + * Returns paginated migration issues + */ +export const listMigrationIssuesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_migrations/{content_migration_id}/migration_issues', + ...options + }); +}; + +/** + * Get a migration issue + * Returns data on an individual migration issue + */ +export const getMigrationIssueCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_migrations/{content_migration_id}/migration_issues/{id}', + ...options + }); +}; + +/** + * Update a migration issue + * Update the workflow_state of a migration issue + */ +export const updateMigrationIssueCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_migrations/{content_migration_id}/migration_issues/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get a content migration + * Returns data on an individual content migration + */ +export const getContentMigrationCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_migrations/{id}', + ...options + }); +}; + +/** + * Update a content migration + * Update a content migration. Takes same arguments as create except that you + * can't change the migration type. However, changing most settings after the + * migration process has started will not do anything. Generally updating the + * content migration will be used when there is a file upload problem. If the + * first upload has a problem you can supply new _pre_attachment_ values to + * start the process again. + */ +export const updateContentMigrationCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/content_migrations/{id}', + ...options + }); +}; + +/** + * Copy course content + * DEPRECATED: Please use the {api:ContentMigrationsController#create Content Migrations API} + * + * Copies content from one course into another. The default is to copy all course + * content. You can control specific types to copy by using either the 'except' option + * or the 'only' option. + * + * The response is the same as the course copy status endpoint + */ +export const copyCourseContent = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/course_copy', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get course copy status + * DEPRECATED: Please use the {api:ContentMigrationsController#create Content Migrations API} + * + * Retrieve the status of a course copy + */ +export const getCourseCopyStatus = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/course_copy/{id}', + ...options + }); +}; + +/** + * Bulk update column data + * Set the content of custom columns + * + * { + * "column_data": [ + * { + * "column_id": example_column_id, + * "user_id": example_student_id, + * "content": example_content + * }, + * { + * "column_id": example_column_id, + * "user_id": example_student_id, + * "content: example_content + * } + * ] + * } + */ +export const bulkUpdateColumnData = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/custom_gradebook_column_data', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List custom gradebook columns + * A paginated list of all custom gradebook columns for a course + */ +export const listCustomGradebookColumns = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/custom_gradebook_columns', + ...options + }); +}; + +/** + * Create a custom gradebook column + * Create a custom gradebook column + */ +export const createCustomGradebookColumn = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/custom_gradebook_columns', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Reorder custom columns + * Puts the given columns in the specified order + * + * 200 OK is returned if successful + */ +export const reorderCustomColumns = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/custom_gradebook_columns/reorder', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a custom gradebook column + * Permanently deletes a custom column and its associated data + */ +export const deleteCustomGradebookColumn = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/custom_gradebook_columns/{id}', + ...options + }); +}; + +/** + * Update a custom gradebook column + * Accepts the same parameters as custom gradebook column creation + */ +export const updateCustomGradebookColumn = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/custom_gradebook_columns/{id}', + ...options + }); +}; + +/** + * List entries for a column + * This does not list entries for students without associated data. + */ +export const listEntriesForColumn = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/custom_gradebook_columns/{id}/data', + ...options + }); +}; + +/** + * Update column data + * Set the content of a custom column + */ +export const updateColumnData = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/custom_gradebook_columns/{id}/data/{user_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Create Tool from ToolConfiguration + * Creates context_external_tool from attached tool_configuration of + * the provided developer_key if not already present in context. + * DeveloperKey must have a ToolConfiguration to create tool or 404 will be raised. + * Will return an existing ContextExternalTool if one already exists. + */ +export const createToolFromToolconfigurationCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/developer_keys/{developer_key_id}/create_tool', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List discussion topics + * Returns the paginated list of discussion topics for this course or group. + */ +export const listDiscussionTopicsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics', + ...options + }); +}; + +/** + * Create a new discussion topic + * Create an new discussion topic for the course or group. + */ +export const createNewDiscussionTopicCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Reorder pinned topics + * Puts the pinned discussion topics in the specified order. + * All pinned topics should be included. + */ +export const reorderPinnedTopicsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/reorder', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a topic + * Deletes the discussion topic. This will also delete the assignment, if it's + * an assignment discussion. + */ +export const deleteTopicCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}', + ...options + }); +}; + +/** + * Get a single topic + * Returns data on an individual discussion topic. See the List action for the response formatting. + */ +export const getSingleTopicCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}', + ...options + }); +}; + +/** + * Update a topic + * Update an existing discussion topic for the course or group. + */ +export const updateTopicCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List topic entries + * Retrieve the (paginated) top-level entries in a discussion topic. + * + * May require (depending on the topic) that the user has posted in the topic. + * If it is required, and the user has not posted, will respond with a 403 + * Forbidden status and the body 'require_initial_post'. + * + * Will include the 10 most recent replies, if any, for each entry returned. + * + * If the topic is a root topic with children corresponding to groups of a + * group assignment, entries from those subtopics for which the user belongs + * to the corresponding group will be returned. + * + * Ordering of returned entries is newest-first by posting timestamp (reply + * activity is ignored). + */ +export const listTopicEntriesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries', + ...options + }); +}; + +/** + * Post an entry + * Create a new entry in a discussion topic. Returns a json representation of + * the created entry (see documentation for 'entries' method) on success. + */ +export const postEntryCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Rate entry + * Rate a discussion entry. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const rateEntryCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{entry_id}/rating', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Mark entry as unread + * Mark a discussion entry as unread. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markEntryAsUnreadCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{entry_id}/read', + ...options + }); +}; + +/** + * Mark entry as read + * Mark a discussion entry as read. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markEntryAsReadCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{entry_id}/read', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List entry replies + * Retrieve the (paginated) replies to a top-level entry in a discussion + * topic. + * + * May require (depending on the topic) that the user has posted in the topic. + * If it is required, and the user has not posted, will respond with a 403 + * Forbidden status and the body 'require_initial_post'. + * + * Ordering of returned entries is newest-first by creation timestamp. + */ +export const listEntryRepliesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{entry_id}/replies', + ...options + }); +}; + +/** + * Post a reply + * Add a reply to an entry in a discussion topic. Returns a json + * representation of the created reply (see documentation for 'replies' + * method) on success. + * + * May require (depending on the topic) that the user has posted in the topic. + * If it is required, and the user has not posted, will respond with a 403 + * Forbidden status and the body 'require_initial_post'. + */ +export const postReplyCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{entry_id}/replies', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete an entry + * Delete a discussion entry. + * + * The entry must have been created by the current user, or the current user + * must have admin rights to the discussion. If the delete is not allowed, a 401 will be returned. + * + * The discussion will be marked deleted, and the user_id and message will be cleared out. + */ +export const deleteEntryCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{id}', + ...options + }); +}; + +/** + * Update an entry + * Update an existing discussion entry. + * + * The entry must have been created by the current user, or the current user + * must have admin rights to the discussion. If the edit is not allowed, a 401 will be returned. + */ +export const updateEntryCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List entries + * Retrieve a paginated list of discussion entries, given a list of ids. + * + * May require (depending on the topic) that the user has posted in the topic. + * If it is required, and the user has not posted, will respond with a 403 + * Forbidden status and the body 'require_initial_post'. + */ +export const listEntriesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entry_list', + ...options + }); +}; + +/** + * Mark topic as unread + * Mark the initial text of the discussion topic as unread. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markTopicAsUnreadCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/read', + ...options + }); +}; + +/** + * Mark topic as read + * Mark the initial text of the discussion topic as read. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markTopicAsReadCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/read', + ...options + }); +}; + +/** + * Mark all entries as unread + * Mark the discussion topic and all its entries as unread. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markAllEntriesAsUnreadCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/read_all', + ...options + }); +}; + +/** + * Mark all entries as read + * Mark the discussion topic and all its entries as read. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markAllEntriesAsReadCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/read_all', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Unsubscribe from a topic + * Unsubscribe from a topic to stop receiving notifications about new entries + * + * On success, the response will be 204 No Content with an empty body + */ +export const unsubscribeFromTopicCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/subscribed', + ...options + }); +}; + +/** + * Subscribe to a topic + * Subscribe to a topic to receive notifications about new entries + * + * On success, the response will be 204 No Content with an empty body + */ +export const subscribeToTopicCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/subscribed', + ...options + }); +}; + +/** + * Get the full topic + * Return a cached structure of the discussion topic, containing all entries, + * their authors, and their message bodies. + * + * May require (depending on the topic) that the user has posted in the topic. + * If it is required, and the user has not posted, will respond with a 403 + * Forbidden status and the body 'require_initial_post'. + * + * In some rare situations, this cached structure may not be available yet. In + * that case, the server will respond with a 503 error, and the caller should + * try again soon. + * + * The response is an object containing the following keys: + * * "participants": A list of summary information on users who have posted to + * the discussion. Each value is an object containing their id, display_name, + * and avatar_url. + * * "unread_entries": A list of entry ids that are unread by the current + * user. this implies that any entry not in this list is read. + * * "entry_ratings": A map of entry ids to ratings by the current user. Entries + * not in this list have no rating. Only populated if rating is enabled. + * * "forced_entries": A list of entry ids that have forced_read_state set to + * true. This flag is meant to indicate the entry's read_state has been + * manually set to 'unread' by the user, so the entry should not be + * automatically marked as read. + * * "view": A threaded view of all the entries in the discussion, containing + * the id, user_id, and message. + * * "new_entries": Because this view is eventually consistent, it's possible + * that newly created or updated entries won't yet be reflected in the view. + * If the application wants to also get a flat list of all entries not yet + * reflected in the view, pass include_new_entries=1 to the request and this + * array of entries will be returned. These entries are returned in a flat + * array, in ascending created_at order. + */ +export const getFullTopicCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/view', + ...options + }); +}; + +/** + * Get effective due dates + * For each assignment in the course, returns each assigned student's ID + * and their corresponding due date along with some grading period data. + * Returns a collection with keys representing assignment IDs and values as a + * collection containing keys representing student IDs and values representing + * the student's effective due_at, the grading_period_id of which the due_at falls + * in, and whether or not the grading period is closed (in_closed_grading_period) + * + * The list of assignment IDs for which effective student due dates are + * requested. If not provided, all assignments in the course will be used. + */ +export const getEffectiveDueDates = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/effective_due_dates', + ...options + }); +}; + +/** + * List enrollments + * Depending on the URL given, return a paginated list of either (1) all of the enrollments in a course, (2) all of the enrollments in a section or (3) all of a user's enrollments. This includes student, teacher, TA, and + * observer enrollments. + * + * If a user has multiple enrollments in a context (e.g. as a teacher + * and a student or in multiple course sections), each enrollment will be + * listed separately. + * + * note: Currently, only a root level admin user can return other users' enrollments. A + * user can, however, return his/her own enrollments. + */ +export const listEnrollmentsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/enrollments', + ...options + }); +}; + +/** + * Enroll a user + * Create a new user enrollment for a course or section. + */ +export const enrollUserCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/enrollments', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Conclude, deactivate, or delete an enrollment + * Conclude, deactivate, or delete an enrollment. If the +task+ argument isn't given, the enrollment + * will be concluded. + */ +export const concludeDeactivateOrDeleteEnrollment = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/enrollments/{id}', + ...options + }); +}; + +/** + * Accept Course Invitation + * accepts a pending course invitation for the current user + */ +export const acceptCourseInvitation = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/enrollments/{id}/accept', + ...options + }); +}; + +/** + * Re-activate an enrollment + * Activates an inactive enrollment + */ +export const reActivateEnrollment = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/enrollments/{id}/reactivate', + ...options + }); +}; + +/** + * Reject Course Invitation + * rejects a pending course invitation for the current user + */ +export const rejectCourseInvitation = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/enrollments/{id}/reject', + ...options + }); +}; + +/** + * Create ePub Export + * Begin an ePub export for a course. + * + * You can use the {api:ProgressController#show Progress API} to track the + * progress of the export. The export's progress is linked to with the + * _progress_url_ value. + * + * When the export completes, use the {api:EpubExportsController#show Show content export} endpoint + * to retrieve a download URL for the exported content. + */ +export const createEpubExport = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/epub_exports', + ...options + }); +}; + +/** + * Show ePub export + * Get information about a single ePub export. + */ +export const showEpubExport = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/epub_exports/{id}', + ...options + }); +}; + +/** + * List external feeds + * Returns the paginated list of External Feeds this course or group. + */ +export const listExternalFeedsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/external_feeds', + ...options + }); +}; + +/** + * Create an external feed + * Create a new external feed for the course or group. + */ +export const createExternalFeedCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/external_feeds', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete an external feed + * Deletes the external feed. + */ +export const deleteExternalFeedCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/external_feeds/{external_feed_id}', + ...options + }); +}; + +/** + * List external tools + * Returns the paginated list of external tools for the current context. + * See the get request docs for a single tool for a list of properties on an external tool. + */ +export const listExternalToolsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/external_tools', + ...options + }); +}; + +/** + * Create an external tool + * Create an external tool in the specified course/account. + * The created tool will be returned, see the "show" endpoint for an example. + */ +export const createExternalToolCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/external_tools', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get a sessionless launch url for an external tool. + * Returns a sessionless launch url for an external tool. + * + * NOTE: Either the id or url must be provided unless launch_type is assessment or module_item. + */ +export const getSessionlessLaunchUrlForExternalToolCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/external_tools/sessionless_launch', + ...options + }); +}; + +/** + * Delete an external tool + * Remove the specified external tool + */ +export const deleteExternalToolCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/external_tools/{external_tool_id}', + ...options + }); +}; + +/** + * Get a single external tool + * Returns the specified external tool. + */ +export const getSingleExternalToolCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/external_tools/{external_tool_id}', + ...options + }); +}; + +/** + * Edit an external tool + * Update the specified external tool. Uses same parameters as create + */ +export const editExternalToolCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/external_tools/{external_tool_id}', + ...options + }); +}; + +/** + * List features + * A paginated list of all features that apply to a given Account, Course, or User. + */ +export const listFeaturesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/features', + ...options + }); +}; + +/** + * List enabled features + * A paginated list of all features that are enabled on a given Account, Course, or User. + * Only the feature names are returned. + */ +export const listEnabledFeaturesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/features/enabled', + ...options + }); +}; + +/** + * Remove feature flag + * Remove feature flag for a given Account, Course, or User. (Note that the flag must + * be defined on the Account, Course, or User directly.) The object will then inherit + * the feature flags from a higher account, if any exist. If this flag was 'on' or 'off', + * then lower-level account flags that were masked by this one will apply again. + */ +export const removeFeatureFlagCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/features/flags/{feature}', + ...options + }); +}; + +/** + * Get feature flag + * Get the feature flag that applies to a given Account, Course, or User. + * The flag may be defined on the object, or it may be inherited from a parent + * account. You can look at the context_id and context_type of the returned object + * to determine which is the case. If these fields are missing, then the object + * is the global Canvas default. + */ +export const getFeatureFlagCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/features/flags/{feature}', + ...options + }); +}; + +/** + * Set feature flag + * Set a feature flag for a given Account, Course, or User. This call will fail if a parent account sets + * a feature flag for the same feature in any state other than "allowed". + */ +export const setFeatureFlagCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/features/flags/{feature}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List files + * Returns the paginated list of files for the folder or course. + */ +export const listFilesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/files', + ...options + }); +}; + +/** + * Get quota information + * Returns the total and used storage quota for the course, group, or user. + */ +export const getQuotaInformationCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/files/quota', + ...options + }); +}; + +/** + * Get file + * Returns the standard attachment json object + */ +export const getFileCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/files/{id}', + ...options + }); +}; + +/** + * List all folders + * Returns the paginated list of all folders for the given context. This will + * be returned as a flat list containing all subfolders as well. + */ +export const listAllFoldersCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/folders', + ...options + }); +}; + +/** + * Create folder + * Creates a folder in the specified context + */ +export const createFolderCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/folders', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Resolve path + * Given the full path to a folder, returns a list of all Folders in the path hierarchy, + * starting at the root folder, and ending at the requested folder. The given path is + * relative to the context's root folder and does not include the root folder's name + * (e.g., "course files"). If an empty path is given, the context's root folder alone + * is returned. Otherwise, if no folder exists with the given full path, a Not Found + * error is returned. + */ +export const resolvePathCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/folders/by_path', + ...options + }); +}; + +/** + * Resolve path + * Given the full path to a folder, returns a list of all Folders in the path hierarchy, + * starting at the root folder, and ending at the requested folder. The given path is + * relative to the context's root folder and does not include the root folder's name + * (e.g., "course files"). If an empty path is given, the context's root folder alone + * is returned. Otherwise, if no folder exists with the given full path, a Not Found + * error is returned. + */ +export const resolvePathCoursesFullPath = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/folders/by_path/*full_path', + ...options + }); +}; + +/** + * Get folder + * Returns the details for a folder + * + * You can get the root folder from a context by using 'root' as the :id. + * For example, you could get the root folder for a course like: + */ +export const getFolderCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/folders/{id}', + ...options + }); +}; + +/** + * Show front page + * Retrieve the content of the front page + */ +export const showFrontPageCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/front_page', + ...options + }); +}; + +/** + * Update/create front page + * Update the title or contents of the front page + */ +export const updateCreateFrontPageCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/front_page', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Days in gradebook history for this course + * Returns a map of dates to grader/assignment groups + */ +export const daysInGradebookHistoryForThisCourse = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/gradebook_history/days', + ...options + }); +}; + +/** + * List uncollated submission versions + * Gives a paginated, uncollated list of submission versions for all matching + * submissions in the context. This SubmissionVersion objects will not include + * the +new_grade+ or +previous_grade+ keys, only the +grade+; same for + * +graded_at+ and +grader+. + */ +export const listUncollatedSubmissionVersions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/gradebook_history/feed', + ...options + }); +}; + +/** + * Details for a given date in gradebook history for this course + * Returns the graders who worked on this day, along with the assignments they worked on. + * More details can be obtained by selecting a grader and assignment and calling the + * 'submissions' api endpoint for a given date. + */ +export const detailsForGivenDateInGradebookHistoryForThisCourse = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/gradebook_history/{date}', + ...options + }); +}; + +/** + * Lists submissions + * Gives a nested list of submission versions + */ +export const listsSubmissions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/gradebook_history/{date}/graders/{grader_id}/assignments/{assignment_id}/submissions', + ...options + }); +}; + +/** + * List grading periods + * Returns the paginated list of grading periods for the current course. + */ +export const listGradingPeriodsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/grading_periods', + ...options + }); +}; + +/** + * Delete a grading period + * 204 No Content response code is returned if the deletion was + * successful. + */ +export const deleteGradingPeriodCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/grading_periods/{id}', + ...options + }); +}; + +/** + * Get a single grading period + * Returns the grading period with the given id + */ +export const getSingleGradingPeriod = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/grading_periods/{id}', + ...options + }); +}; + +/** + * Update a single grading period + * Update an existing grading period. + */ +export const updateSingleGradingPeriod = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/grading_periods/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List the grading standards available in a context. + * Returns the paginated list of grading standards for the given context that are visible to the user. + */ +export const listGradingStandardsAvailableInContextCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/grading_standards', + ...options + }); +}; + +/** + * Create a new grading standard + * Create a new grading standard + * + * If grading_scheme_entry arguments are omitted, then a default grading scheme + * will be set. The default scheme is as follows: + * "A" : 94, + * "A-" : 90, + * "B+" : 87, + * "B" : 84, + * "B-" : 80, + * "C+" : 77, + * "C" : 74, + * "C-" : 70, + * "D+" : 67, + * "D" : 64, + * "D-" : 61, + * "F" : 0, + */ +export const createNewGradingStandardCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/grading_standards', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get a single grading standard in a context. + * Returns a grading standard for the given context that is visible to the user. + */ +export const getSingleGradingStandardInContextCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/grading_standards/{grading_standard_id}', + ...options + }); +}; + +/** + * List group categories for a context + * Returns a paginated list of group categories in a context + */ +export const listGroupCategoriesForContextCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/group_categories', + ...options + }); +}; + +/** + * Create a Group Category + * Create a new group category + */ +export const createGroupCategoryCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/group_categories', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List the groups available in a context. + * Returns the paginated list of active groups in the given context that are visible to user. + */ +export const listGroupsAvailableInContextCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/groups', + ...options + }); +}; + +/** + * List live assessments + * Returns a paginated list of live assessments. + */ +export const listLiveAssessments = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/live_assessments', + ...options + }); +}; + +/** + * Create or find a live assessment + * Creates or finds an existing live assessment with the given key and aligns it with + * the linked outcome + */ +export const createOrFindLiveAssessment = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/live_assessments', + ...options + }); +}; + +/** + * List live assessment results + * Returns a paginated list of live assessment results + */ +export const listLiveAssessmentResults = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/live_assessments/{assessment_id}/results', + ...options + }); +}; + +/** + * Create live assessment results + * Creates live assessment results and adds them to a live assessment + */ +export const createLiveAssessmentResults = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/live_assessments/{assessment_id}/results', + ...options + }); +}; + +/** + * Get module item sequence + * Given an asset in a course, find the ModuleItem it belongs to, the previous and next Module Items + * in the course sequence, and also any applicable mastery path rules + */ +export const getModuleItemSequence = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/module_item_sequence', + ...options + }); +}; + +/** + * List modules + * A paginated list of the modules in a course + */ +export const listModules = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules', + ...options + }); +}; + +/** + * Create a module + * Create and return a new module + */ +export const createModule = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete module + * Delete a module + */ +export const deleteModule = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{id}', + ...options + }); +}; + +/** + * Show module + * Get information about a single module + */ +export const showModule = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{id}', + ...options + }); +}; + +/** + * Update a module + * Update and return an existing module + */ +export const updateModule = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Re-lock module progressions + * Resets module progressions to their default locked state and + * recalculates them based on the current requirements. + * + * Adding progression requirements to an active course will not lock students + * out of modules they have already unlocked unless this action is called. + */ +export const reLockModuleProgressions = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{id}/relock', + ...options + }); +}; + +/** + * List module items + * A paginated list of the items in a module + */ +export const listModuleItems = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{module_id}/items', + ...options + }); +}; + +/** + * Create a module item + * Create and return a new module item + */ +export const createModuleItem = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{module_id}/items', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete module item + * Delete a module item + */ +export const deleteModuleItem = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}', + ...options + }); +}; + +/** + * Show module item + * Get information about a single module item + */ +export const showModuleItem = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}', + ...options + }); +}; + +/** + * Update a module item + * Update and return an existing module item + */ +export const updateModuleItem = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Mark module item as done/not done + * Mark a module item as done/not done. Use HTTP method PUT to mark as done, + * and DELETE to mark as not done. + */ +export const markModuleItemAsDoneNotDone = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}/done', + ...options + }); +}; + +/** + * Mark module item read + * Fulfills "must view" requirement for a module item. It is generally not necessary to do this explicitly, + * but it is provided for applications that need to access external content directly (bypassing the html_url + * redirect that normally allows Canvas to fulfill "must view" requirements). + * + * This endpoint cannot be used to complete requirements on locked or unpublished module items. + */ +export const markModuleItemRead = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}/mark_read', + ...options + }); +}; + +/** + * Select a mastery path + * Select a mastery path when module item includes several possible paths. + * Requires Mastery Paths feature to be enabled. Returns a compound document + * with the assignments included in the given path and any module items + * related to those assignments + */ +export const selectMasteryPath = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}/select_mastery_path', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get aligned assignments for an outcome in a course for a particular student + */ +export const getAlignedAssignmentsForOutcomeInCourseForParticularStudent = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_alignments', + ...options + }); +}; + +/** + * Get all outcome links for context + */ +export const getAllOutcomeLinksForContextCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_group_links', + ...options + }); +}; + +/** + * Get all outcome groups for context + */ +export const getAllOutcomeGroupsForContextCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups', + ...options + }); +}; + +/** + * Delete an outcome group + * Deleting an outcome group deletes descendant outcome groups and outcome + * links. The linked outcomes themselves are only deleted if all links to the + * outcome were deleted. + * + * Aligned outcomes cannot be deleted; as such, if all remaining links to an + * aligned outcome are included in this group's descendants, the group + * deletion will fail. + */ +export const deleteOutcomeGroupCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups/{id}', + ...options + }); +}; + +/** + * Show an outcome group + */ +export const showOutcomeGroupCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups/{id}', + ...options + }); +}; + +/** + * Update an outcome group + * Modify an existing outcome group. Fields not provided are left as is; + * unrecognized fields are ignored. + * + * When changing the parent outcome group, the new parent group must belong to + * the same context as this outcome group, and must not be a descendant of + * this outcome group (i.e. no cycles allowed). + */ +export const updateOutcomeGroupCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Import an outcome group + * Creates a new subgroup of the outcome group with the same title and + * description as the source group, then creates links in that new subgroup to + * the same outcomes that are linked in the source group. Recurses on the + * subgroups of the source group, importing them each in turn into the new + * subgroup. + * + * Allows you to copy organizational structure, but does not create copies of + * the outcomes themselves, only new links. + * + * The source group must be either global, from the same context as this + * outcome group, or from an associated account. The source group cannot be + * the root outcome group of its context. + */ +export const importOutcomeGroupCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups/{id}/import', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List linked outcomes + * A paginated list of the immediate OutcomeLink children of the outcome group. + */ +export const listLinkedOutcomesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups/{id}/outcomes', + ...options + }); +}; + +/** + * Create/link an outcome + * Link an outcome into the outcome group. The outcome to link can either be + * specified by a PUT to the link URL for a specific outcome (the outcome_id + * in the PUT URLs) or by supplying the information for a new outcome (title, + * description, ratings, mastery_points) in a POST to the collection. + * + * If linking an existing outcome, the outcome_id must identify an outcome + * available to this context; i.e. an outcome owned by this group's context, + * an outcome owned by an associated account, or a global outcome. With + * outcome_id present, any other parameters (except move_from) are ignored. + * + * If defining a new outcome, the outcome is created in the outcome group's + * context using the provided title, description, ratings, and mastery points; + * the title is required but all other fields are optional. The new outcome + * is then linked into the outcome group. + * + * If ratings are provided when creating a new outcome, an embedded rubric + * criterion is included in the new outcome. This criterion's mastery_points + * default to the maximum points in the highest rating if not specified in the + * mastery_points parameter. Any ratings lacking a description are given a + * default of "No description". Any ratings lacking a point value are given a + * default of 0. If no ratings are provided, the mastery_points parameter is + * ignored. + */ +export const createLinkOutcomeCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups/{id}/outcomes', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Unlink an outcome + * Unlinking an outcome only deletes the outcome itself if this was the last + * link to the outcome in any group in any context. Aligned outcomes cannot be + * deleted; as such, if this is the last link to an aligned outcome, the + * unlinking will fail. + */ +export const unlinkOutcomeCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups/{id}/outcomes/{outcome_id}', + ...options + }); +}; + +/** + * Create/link an outcome + * Link an outcome into the outcome group. The outcome to link can either be + * specified by a PUT to the link URL for a specific outcome (the outcome_id + * in the PUT URLs) or by supplying the information for a new outcome (title, + * description, ratings, mastery_points) in a POST to the collection. + * + * If linking an existing outcome, the outcome_id must identify an outcome + * available to this context; i.e. an outcome owned by this group's context, + * an outcome owned by an associated account, or a global outcome. With + * outcome_id present, any other parameters (except move_from) are ignored. + * + * If defining a new outcome, the outcome is created in the outcome group's + * context using the provided title, description, ratings, and mastery points; + * the title is required but all other fields are optional. The new outcome + * is then linked into the outcome group. + * + * If ratings are provided when creating a new outcome, an embedded rubric + * criterion is included in the new outcome. This criterion's mastery_points + * default to the maximum points in the highest rating if not specified in the + * mastery_points parameter. Any ratings lacking a description are given a + * default of "No description". Any ratings lacking a point value are given a + * default of 0. If no ratings are provided, the mastery_points parameter is + * ignored. + */ +export const createLinkOutcomeCoursesOutcomeId = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups/{id}/outcomes/{outcome_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List subgroups + * A paginated list of the immediate OutcomeGroup children of the outcome group. + */ +export const listSubgroupsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups/{id}/subgroups', + ...options + }); +}; + +/** + * Create a subgroup + * Creates a new empty subgroup under the outcome group with the given title + * and description. + */ +export const createSubgroupCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_groups/{id}/subgroups', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Import Outcomes + * Import outcomes into Canvas. + * + * For more information on the format that's expected here, please see the + * "Outcomes CSV" section in the API docs. + */ +export const importOutcomesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_imports', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get Outcome import status + * Get the status of an already created Outcome import. Pass 'latest' for the outcome import id + * for the latest import. + * + * Examples: + * curl 'https:///api/v1/accounts//outcome_imports/' \ + * -H "Authorization: Bearer " + * curl 'https:///api/v1/courses//outcome_imports/' \ + * -H "Authorization: Bearer " + */ +export const getOutcomeImportStatusCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/outcome_imports/{id}', + ...options + }); +}; + +/** + * Get outcome results + * Gets the outcome results for users and outcomes in the specified context. + */ +export const getOutcomeResults = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/outcome_results', + ...options + }); +}; + +/** + * Get outcome result rollups + * Gets the outcome rollups for the users and outcomes in the specified context. + */ +export const getOutcomeResultRollups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/outcome_rollups', + ...options + }); +}; + +/** + * List pages + * A paginated list of the wiki pages associated with a course or group + */ +export const listPagesCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/pages', + ...options + }); +}; + +/** + * Create page + * Create a new wiki page + */ +export const createPageCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/pages', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete page + * Delete a wiki page + */ +export const deletePageCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/pages/{url}', + ...options + }); +}; + +/** + * Show page + * Retrieve the content of a wiki page + */ +export const showPageCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/pages/{url}', + ...options + }); +}; + +/** + * Update/create page + * Update the title or contents of a wiki page + */ +export const updateCreatePageCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/pages/{url}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Duplicate page + * Duplicate a wiki page + */ +export const duplicatePage = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/pages/{url}/duplicate', + ...options + }); +}; + +/** + * List revisions + * A paginated list of the revisions of a page. Callers must have update rights on the page in order to see page history. + */ +export const listRevisionsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/pages/{url}/revisions', + ...options + }); +}; + +/** + * Show revision + * Retrieve the metadata and optionally content of a revision of the page. + * Note that retrieving historic versions of pages requires edit rights. + */ +export const showRevisionCoursesLatest = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/pages/{url}/revisions/latest', + ...options + }); +}; + +/** + * Show revision + * Retrieve the metadata and optionally content of a revision of the page. + * Note that retrieving historic versions of pages requires edit rights. + */ +export const showRevisionCoursesRevisionId = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/pages/{url}/revisions/{revision_id}', + ...options + }); +}; + +/** + * Revert to revision + * Revert a page to a prior revision. + */ +export const revertToRevisionCourses = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/pages/{url}/revisions/{revision_id}', + ...options + }); +}; + +/** + * Permissions + * Returns permission information for the calling user in the given course. + * See also the {api:AccountsController#permissions Account} and + * {api:GroupsController#permissions Group} counterparts. + */ +export const coursePermission = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/permissions', + ...options + }); +}; + +/** + * List potential members + * A paginated list of the users who can potentially be added to a + * collaboration in the given context. + * + * For courses, this consists of all enrolled users. For groups, it is comprised of the + * group members plus the admins of the course containing the group. + */ +export const listPotentialMembersCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/potential_collaborators', + ...options + }); +}; + +/** + * Preview processed html + * Preview html content processed for this course + */ +export const previewProcessedHtmlCourse = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/preview_html', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Set extensions for student quiz submissions + * Responses + * + * * 200 OK if the request was successful + * * 403 Forbidden if you are not allowed to extend quizzes for this course + */ +export const setExtensionsForStudentQuizSubmissions = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quiz_extensions', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List quizzes in a course + * Returns the paginated list of Quizzes in this course. + */ +export const listQuizzesInCourse = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes', + ...options + }); +}; + +/** + * Create a quiz + * Create a new quiz for this course. + */ +export const createQuiz = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Retrieve assignment-overridden dates for quizzes + * Retrieve the actual due-at, unlock-at, and available-at dates for quizzes + * based on the assignment overrides active for the current API user. + */ +export const retrieveAssignmentOverriddenDatesForQuizzes = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/quizzes/assignment_overrides', + ...options + }); +}; + +/** + * Delete a quiz + */ +export const deleteQuiz = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{id}', + ...options + }); +}; + +/** + * Get a single quiz + * Returns the quiz with the given id. + */ +export const getSingleQuiz = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{id}', + ...options + }); +}; + +/** + * Edit a quiz + * Modify an existing quiz. See the documentation for quiz creation. + * + * Additional arguments: + */ +export const editQuiz = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Reorder quiz items + * Change order of the quiz questions or groups within the quiz + * + * 204 No Content response code is returned if the reorder was successful. + */ +export const reorderQuizItems = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{id}/reorder', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Send a message to unsubmitted or submitted users for the quiz + * { + * "body": { + * "type": "string", + * "description": "message body of the conversation to be created", + * "example": "Please take the quiz." + * }, + * "recipients": { + * "type": "string", + * "description": "Who to send the message to. May be either 'submitted' or 'unsubmitted'", + * "example": "submitted" + * }, + * "subject": { + * "type": "string", + * "description": "Subject of the new Conversation created", + * "example": "ATTN: Quiz 101 Students" + * } + * } + */ +export const sendMessageToUnsubmittedOrSubmittedUsersForQuiz = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{id}/submission_users/message', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Validate quiz access code + * Accepts an access code and returns a boolean indicating whether that access code is correct + */ +export const validateQuizAccessCode = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{id}/validate_access_code', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Set extensions for student quiz submissions + * Responses + * + * * 200 OK if the request was successful + * * 403 Forbidden if you are not allowed to extend quizzes for this course + */ +export const setExtensionsForStudentQuiz = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/extensions', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Create a question group + * Create a new question group for this quiz + * + * 201 Created response code is returned if the creation was successful. + */ +export const createQuestionGroup = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/groups', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a question group + * Delete a question group + * + * 204 No Content response code is returned if the deletion was successful. + */ +export const deleteQuestionGroup = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/groups/{id}', + ...options + }); +}; + +/** + * Get a single quiz group + * Returns details of the quiz group with the given id. + */ +export const getSingleQuizGroup = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/groups/{id}', + ...options + }); +}; + +/** + * Update a question group + * Update a question group + */ +export const updateQuestionGroup = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/groups/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Reorder question groups + * Change the order of the quiz questions within the group + * + * 204 No Content response code is returned if the reorder was successful. + */ +export const reorderQuestionGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/groups/{id}/reorder', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get available quiz IP filters. + * Get a list of available IP filters for this Quiz. + * + * 200 OK response code is returned if the request was successful. + */ +export const getAvailableQuizIpFilters = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/ip_filters', + ...options + }); +}; + +/** + * List questions in a quiz or a submission + * Returns the paginated list of QuizQuestions in this quiz. + */ +export const listQuestionsInQuizOrSubmission = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/questions', + ...options + }); +}; + +/** + * Create a single quiz question + * Create a new quiz question for this quiz + */ +export const createSingleQuizQuestion = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/questions', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a quiz question + * 204 No Content response code is returned if the deletion was successful. + */ +export const deleteQuizQuestion = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/questions/{id}', + ...options + }); +}; + +/** + * Get a single quiz question + * Returns the quiz question with the given id + */ +export const getSingleQuizQuestion = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/questions/{id}', + ...options + }); +}; + +/** + * Update an existing quiz question + * Updates an existing quiz question for this quiz + */ +export const updateExistingQuizQuestion = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/questions/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Retrieve all quiz reports + * Returns a list of all available reports. + */ +export const retrieveAllQuizReports = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/reports', + ...options + }); +}; + +/** + * Create a quiz report + * Create and return a new report for this quiz. If a previously + * generated report matches the arguments and is still current (i.e. + * there have been no new submissions), it will be returned. + * + * *Responses* + * + * * 400 Bad Request if the specified report type is invalid + * * 409 Conflict if a quiz report of the specified type is already being + * generated + */ +export const createQuizReport = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/reports', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Abort the generation of a report, or remove a previously generated one + * This API allows you to cancel a previous request you issued for a report to + * be generated. Or in the case of an already generated report, you'd like to + * remove it, perhaps to generate it another time with an updated version that + * provides new features. + * + * You must check the report's generation status before attempting to use this + * interface. See the "workflow_state" property of the QuizReport's Progress + * object for more information. Only when the progress reports itself in a + * "queued" state can the generation be aborted. + * + * *Responses* + * + * - 204 No Content if your request was accepted + * - 422 Unprocessable Entity if the report is not being generated + * or can not be aborted at this stage + */ +export const abortGenerationOfReportOrRemovePreviouslyGeneratedOne = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/reports/{id}', + ...options + }); +}; + +/** + * Get a quiz report + * Returns the data for a single quiz report. + */ +export const getQuizReport = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/reports/{id}', + ...options + }); +}; + +/** + * Fetching the latest quiz statistics + * This endpoint provides statistics for all quiz versions, or for a specific + * quiz version, in which case the output is guaranteed to represent the + * _latest_ and most current version of the quiz. + * + * 200 OK response code is returned if the request was successful. + */ +export const fetchingLatestQuizStatistics = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/statistics', + ...options + }); +}; + +/** + * Get the quiz submission. + * Get the submission for this quiz for the current user. + * + * 200 OK response code is returned if the request was successful. + */ +export const getQuizSubmission = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submission', + ...options + }); +}; + +/** + * Get all quiz submissions. + * Get a list of all submissions for this quiz. Users who can view or manage + * grades for a course will have submissions from multiple users returned. A + * user who can only submit will have only their own submissions returned. When + * a user has an in-progress submission, only that submission is returned. When + * there isn't an in-progress quiz_submission, all completed submissions, + * including previous attempts, are returned. + * + * 200 OK response code is returned if the request was successful. + */ +export const getAllQuizSubmissions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions', + ...options + }); +}; + +/** + * Create the quiz submission (start a quiz-taking session) + * Start taking a Quiz by creating a QuizSubmission which you can use to answer + * questions and submit your answers. + * + * Responses + * + * * 200 OK if the request was successful + * * 400 Bad Request if the quiz is locked + * * 403 Forbidden if an invalid access code is specified + * * 403 Forbidden if the Quiz's IP filter restriction does not pass + * * 409 Conflict if a QuizSubmission already exists for this user and quiz + */ +export const createQuizSubmissionStartQuizTakingSession = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Upload a file + * Associate a new quiz submission file + * + * This API endpoint is the first step in uploading a quiz submission file. + * See the {file:file_uploads.html File Upload Documentation} for details on + * the file upload workflow as these parameters are interpreted as per the + * documentation there. + */ +export const uploadFileQuizSubmission = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/self/files', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get a single quiz submission. + * Get a single quiz submission. + * + * 200 OK response code is returned if the request was successful. + */ +export const getSingleQuizSubmission = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}', + ...options + }); +}; + +/** + * Update student question scores and comments. + * Update the amount of points a student has scored for questions they've + * answered, provide comments for the student about their answer(s), or simply + * fudge the total score by a specific amount of points. + * + * Responses + * + * * 200 OK if the request was successful + * * 403 Forbidden if you are not a teacher in this course + * * 400 Bad Request if the attempt parameter is missing or invalid + * * 400 Bad Request if the specified QS attempt is not yet complete + */ +export const updateStudentQuestionScoresAndComments = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Complete the quiz submission (turn it in). + * Complete the quiz submission by marking it as complete and grading it. When + * the quiz submission has been marked as complete, no further modifications + * will be allowed. + * + * Responses + * + * * 200 OK if the request was successful + * * 403 Forbidden if an invalid access code is specified + * * 403 Forbidden if the Quiz's IP filter restriction does not pass + * * 403 Forbidden if an invalid token is specified + * * 400 Bad Request if the QS is already complete + * * 400 Bad Request if the attempt parameter is missing + * * 400 Bad Request if the attempt parameter is not the latest attempt + */ +export const completeQuizSubmissionTurnItIn = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}/complete', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Retrieve captured events + * Retrieve the set of events captured during a specific submission attempt. + */ +export const retrieveCapturedEvents = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}/events', + ...options + }); +}; + +/** + * Submit captured events + * Store a set of events which were captured during a quiz taking session. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const submitCapturedEvents = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}/events', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get current quiz submission times. + * Get the current timing data for the quiz attempt, both the end_at timestamp + * and the time_left parameter. + * + * Responses + * + * * 200 OK if the request was successful + */ +export const getCurrentQuizSubmissionTimes = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}/time', + ...options + }); +}; + +/** + * List recently logged in students + * Returns the paginated list of users in this course, ordered by how recently they have + * logged in. The records include the 'last_login' field which contains + * a timestamp of the last time that user logged into canvas. The querying + * user must have the 'View usage reports' permission. + */ +export const listRecentlyLoggedInStudents = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/recent_students', + ...options + }); +}; + +/** + * Reset a course + * Deletes the current course, and creates a new equivalent course with + * no content, but all sections and users moved over. + */ +export const resetCourse = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/reset_content', + ...options + }); +}; + +/** + * Redirect to root outcome group for context + * Convenience redirect to find the root outcome group for a particular + * context. Will redirect to the appropriate outcome group's URL. + */ +export const redirectToRootOutcomeGroupForContextCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/root_outcome_group', + ...options + }); +}; + +/** + * List rubrics + * Returns the paginated list of active rubrics for the current context. + */ +export const listRubricsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/rubrics', + ...options + }); +}; + +/** + * Get a single rubric + * Returns the rubric with the given id. + */ +export const getSingleRubricCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/rubrics/{id}', + ...options + }); +}; + +/** + * List users in course + * Returns the paginated list of users in this course. And optionally the user's enrollments in the course. + */ +export const listUsersInCourseSearchUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/search_users', + ...options + }); +}; + +/** + * List course sections + * A paginated list of the list of sections for this course. + */ +export const listCourseSections = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/sections', + ...options + }); +}; + +/** + * Create course section + * Creates a new section for this course. + */ +export const createCourseSection = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/sections', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get section information + * Gets details about a specific section + */ +export const getSectionInformationCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/sections/{id}', + ...options + }); +}; + +/** + * Get course settings + * Returns some of a course's settings. + */ +export const getCourseSettings = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/settings', + ...options + }); +}; + +/** + * Update course settings + * Can update the following course settings: + */ +export const updateCourseSettings = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/settings', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * @deprecated + * List students + * Returns the paginated list of students enrolled in this course. + * + * DEPRECATED: Please use the {api:CoursesController#users course users} endpoint + * and pass "student" as the enrollment_type. + */ +export const listStudents = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/students', + ...options + }); +}; + +/** + * List submissions for multiple assignments + * A paginated list of all existing submissions for a given set of students and assignments. + */ +export const listSubmissionsForMultipleAssignmentsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/students/submissions', + ...options + }); +}; + +/** + * Grade or comment on multiple submissions + * Update the grading and comments on multiple student's assignment + * submissions in an asynchronous job. + * + * The user must have permission to manage grades in the appropriate context + * (course or section). + */ +export const gradeOrCommentOnMultipleSubmissionsCoursesSubmissions = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/submissions/update_grades', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List available tabs for a course or group + * Returns a paginated list of navigation tabs available in the current context. + */ +export const listAvailableTabsForCourseOrGroupCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/tabs', + ...options + }); +}; + +/** + * Update a tab for a course + * Home and Settings tabs are not manageable, and can't be hidden or moved + * + * Returns a tab object + */ +export const updateTabForCourse = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/tabs/{tab_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Course TODO items + * Returns the current user's course-specific todo items. + * + * For full documentation, see the API documentation for the user todo items, in the user api. + */ +export const courseTodoItems = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/todo', + ...options + }); +}; + +/** + * Remove usage rights + * Removes copyright and license information associated with one or more files + */ +export const removeUsageRightsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/usage_rights', + ...options + }); +}; + +/** + * Set usage rights + * Sets copyright and license information for one or more files + */ +export const setUsageRightsCourses = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/usage_rights', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List users in course + * Returns the paginated list of users in this course. And optionally the user's enrollments in the course. + */ +export const listUsersInCourseUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/courses/{course_id}/users', + ...options + }); +}; + +/** + * Get single user + * Return information on a single user. + * + * Accepts the same include[] parameters as the :users: action, and returns a + * single user with the same fields as that action. + */ +export const getSingleUser = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/users/{id}', + ...options + }); +}; + +/** + * Adds last attended date to student enrollment in course + */ +export const addsLastAttendedDateToStudentEnrollmentInCourse = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{course_id}/users/{user_id}/last_attended', + ...options + }); +}; + +/** + * Delete/Conclude a course + * Delete or conclude an existing course + */ +export const deleteConcludeCourse = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{id}', + ...options + }); +}; + +/** + * Get a single course + * Return information on a single course. + * + * Accepts the same include[] parameters as the list action plus: + */ +export const getSingleCourseCourses = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{id}', + ...options + }); +}; + +/** + * Update a course + * Update an existing course. + * + * Arguments are the same as Courses#create, with a few exceptions (enroll_me). + * + * If a user has content management rights, but not full course editing rights, the only attribute + * editable through this endpoint will be "syllabus_body" + */ +export const updateCourse = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get a late policy + * Returns the late policy for a course. + */ +export const getLatePolicy = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{id}/late_policy', + ...options + }); +}; + +/** + * Patch a late policy + * Patch a late policy. No body is returned upon success. + */ +export const patchLatePolicy = (options: Options) => { + return (options.client ?? _heyApiClient).patch({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{id}/late_policy', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Create a late policy + * Create a late policy. If the course already has a late policy, a + * bad_request is returned since there can only be one late policy + * per course. + */ +export const createLatePolicy = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/courses/{id}/late_policy', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List courses with their latest ePub export + * A paginated list of all courses a user is actively participating in, and + * the latest ePub export associated with the user & course. + */ +export const listCoursesWithTheirLatestEpubExport = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/epub_exports', + ...options + }); +}; + +/** + * Create Error Report + * Create a new error report documenting an experienced problem + * + * Performs the same action as when a user uses the "help -> report a problem" + * dialog. + */ +export const createErrorReport = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/error_reports', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete file + * Remove the specified file + */ +export const deleteFile = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/files/{id}', + ...options + }); +}; + +/** + * Get file + * Returns the standard attachment json object + */ +export const getFileFiles = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/files/{id}', + ...options + }); +}; + +/** + * Update file + * Update some settings on the specified file + */ +export const updateFile = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/files/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get public inline preview url + * Determine the URL that should be used for inline preview of the file. + */ +export const getPublicInlinePreviewUrl = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/files/{id}/public_url', + ...options + }); +}; + +/** + * Copy a file + * Copy a file from elsewhere in Canvas into a folder. + * + * Copying a file across contexts (between courses and users) is permitted, + * but the source and destination must belong to the same institution. + */ +export const copyFile = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/folders/{dest_folder_id}/copy_file', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Copy a folder + * Copy a folder (and its contents) from elsewhere in Canvas into a folder. + * + * Copying a folder across contexts (between courses and users) is permitted, + * but the source and destination must belong to the same institution. + * If the source and destination folders are in the same context, the + * source folder may not contain the destination folder. A folder will be + * renamed at its destination if another folder with the same name already + * exists. + */ +export const copyFolder = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/folders/{dest_folder_id}/copy_folder', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Upload a file + * Upload a file to a folder. + * + * This API endpoint is the first step in uploading a file. + * See the {file:file_uploads.html File Upload Documentation} for details on + * the file upload workflow. + * + * Only those with the "Manage Files" permission on a course or group can + * upload files to a folder in that course or group. + */ +export const uploadFileToFolder = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/folders/{folder_id}/files', + ...options + }); +}; + +/** + * Create folder + * Creates a folder in the specified context + */ +export const createFolderFolders = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/folders/{folder_id}/folders', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete folder + * Remove the specified folder. You can only delete empty folders unless you + * set the 'force' flag + */ +export const deleteFolder = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/folders/{id}', + ...options + }); +}; + +/** + * Get folder + * Returns the details for a folder + * + * You can get the root folder from a context by using 'root' as the :id. + * For example, you could get the root folder for a course like: + */ +export const getFolderFolders = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/folders/{id}', + ...options + }); +}; + +/** + * Update folder + * Updates a folder + */ +export const updateFolder = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/folders/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List files + * Returns the paginated list of files for the folder or course. + */ +export const listFilesFolders = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/folders/{id}/files', + ...options + }); +}; + +/** + * List folders + * Returns the paginated list of folders in the folder. + */ +export const listFolders = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/folders/{id}/folders', + ...options + }); +}; + +/** + * Delete an outcome group + * Deleting an outcome group deletes descendant outcome groups and outcome + * links. The linked outcomes themselves are only deleted if all links to the + * outcome were deleted. + * + * Aligned outcomes cannot be deleted; as such, if all remaining links to an + * aligned outcome are included in this group's descendants, the group + * deletion will fail. + */ +export const deleteOutcomeGroupGlobal = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/outcome_groups/{id}', + ...options + }); +}; + +/** + * Show an outcome group + */ +export const showOutcomeGroupGlobal = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/outcome_groups/{id}', + ...options + }); +}; + +/** + * Update an outcome group + * Modify an existing outcome group. Fields not provided are left as is; + * unrecognized fields are ignored. + * + * When changing the parent outcome group, the new parent group must belong to + * the same context as this outcome group, and must not be a descendant of + * this outcome group (i.e. no cycles allowed). + */ +export const updateOutcomeGroupGlobal = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/outcome_groups/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Import an outcome group + * Creates a new subgroup of the outcome group with the same title and + * description as the source group, then creates links in that new subgroup to + * the same outcomes that are linked in the source group. Recurses on the + * subgroups of the source group, importing them each in turn into the new + * subgroup. + * + * Allows you to copy organizational structure, but does not create copies of + * the outcomes themselves, only new links. + * + * The source group must be either global, from the same context as this + * outcome group, or from an associated account. The source group cannot be + * the root outcome group of its context. + */ +export const importOutcomeGroupGlobal = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/outcome_groups/{id}/import', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List linked outcomes + * A paginated list of the immediate OutcomeLink children of the outcome group. + */ +export const listLinkedOutcomesGlobal = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/outcome_groups/{id}/outcomes', + ...options + }); +}; + +/** + * Create/link an outcome + * Link an outcome into the outcome group. The outcome to link can either be + * specified by a PUT to the link URL for a specific outcome (the outcome_id + * in the PUT URLs) or by supplying the information for a new outcome (title, + * description, ratings, mastery_points) in a POST to the collection. + * + * If linking an existing outcome, the outcome_id must identify an outcome + * available to this context; i.e. an outcome owned by this group's context, + * an outcome owned by an associated account, or a global outcome. With + * outcome_id present, any other parameters (except move_from) are ignored. + * + * If defining a new outcome, the outcome is created in the outcome group's + * context using the provided title, description, ratings, and mastery points; + * the title is required but all other fields are optional. The new outcome + * is then linked into the outcome group. + * + * If ratings are provided when creating a new outcome, an embedded rubric + * criterion is included in the new outcome. This criterion's mastery_points + * default to the maximum points in the highest rating if not specified in the + * mastery_points parameter. Any ratings lacking a description are given a + * default of "No description". Any ratings lacking a point value are given a + * default of 0. If no ratings are provided, the mastery_points parameter is + * ignored. + */ +export const createLinkOutcomeGlobal = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/outcome_groups/{id}/outcomes', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Unlink an outcome + * Unlinking an outcome only deletes the outcome itself if this was the last + * link to the outcome in any group in any context. Aligned outcomes cannot be + * deleted; as such, if this is the last link to an aligned outcome, the + * unlinking will fail. + */ +export const unlinkOutcomeGlobal = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/outcome_groups/{id}/outcomes/{outcome_id}', + ...options + }); +}; + +/** + * Create/link an outcome + * Link an outcome into the outcome group. The outcome to link can either be + * specified by a PUT to the link URL for a specific outcome (the outcome_id + * in the PUT URLs) or by supplying the information for a new outcome (title, + * description, ratings, mastery_points) in a POST to the collection. + * + * If linking an existing outcome, the outcome_id must identify an outcome + * available to this context; i.e. an outcome owned by this group's context, + * an outcome owned by an associated account, or a global outcome. With + * outcome_id present, any other parameters (except move_from) are ignored. + * + * If defining a new outcome, the outcome is created in the outcome group's + * context using the provided title, description, ratings, and mastery points; + * the title is required but all other fields are optional. The new outcome + * is then linked into the outcome group. + * + * If ratings are provided when creating a new outcome, an embedded rubric + * criterion is included in the new outcome. This criterion's mastery_points + * default to the maximum points in the highest rating if not specified in the + * mastery_points parameter. Any ratings lacking a description are given a + * default of "No description". Any ratings lacking a point value are given a + * default of 0. If no ratings are provided, the mastery_points parameter is + * ignored. + */ +export const createLinkOutcomeGlobalOutcomeId = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/outcome_groups/{id}/outcomes/{outcome_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List subgroups + * A paginated list of the immediate OutcomeGroup children of the outcome group. + */ +export const listSubgroupsGlobal = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/outcome_groups/{id}/subgroups', + ...options + }); +}; + +/** + * Create a subgroup + * Creates a new empty subgroup under the outcome group with the given title + * and description. + */ +export const createSubgroupGlobal = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/outcome_groups/{id}/subgroups', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Redirect to root outcome group for context + * Convenience redirect to find the root outcome group for a particular + * context. Will redirect to the appropriate outcome group's URL. + */ +export const redirectToRootOutcomeGroupForContextGlobal = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/global/root_outcome_group', + ...options + }); +}; + +/** + * Delete a Group Category + * Deletes a group category and all groups under it. Protected group + * categories can not be deleted, i.e. "communities" and "student_organized". + */ +export const deleteGroupCategory = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/group_categories/{group_category_id}', + ...options + }); +}; + +/** + * Get a single group category + * Returns the data for a single group category, or a 401 if the caller doesn't have + * the rights to see it. + */ +export const getSingleGroupCategory = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/group_categories/{group_category_id}', + ...options + }); +}; + +/** + * Update a Group Category + * Modifies an existing group category. + */ +export const updateGroupCategory = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/group_categories/{group_category_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Assign unassigned members + * Assign all unassigned members as evenly as possible among the existing + * student groups. + */ +export const assignUnassignedMembers = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/group_categories/{group_category_id}/assign_unassigned_members', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Create a group + * Creates a new group. Groups created using the "/api/v1/groups/" + * endpoint will be community groups. + */ +export const createGroupGroupCategories = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/group_categories/{group_category_id}/groups', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List users in group category + * Returns a paginated list of users in the group category. + */ +export const listUsersInGroupCategory = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/group_categories/{group_category_id}/users', + ...options + }); +}; + +/** + * Create a group + * Creates a new group. Groups created using the "/api/v1/groups/" + * endpoint will be community groups. + */ +export const createGroupGroups = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a group + * Deletes a group and removes all members. + */ +export const deleteGroup = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}', + ...options + }); +}; + +/** + * Get a single group + * Returns the data for a single group, or a 401 if the caller doesn't have + * the rights to see it. + */ +export const getSingleGroup = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}', + ...options + }); +}; + +/** + * Edit a group + * Modifies an existing group. Note that to set an avatar image for the + * group, you must first upload the image file to the group, and the use the + * id in the response as the argument to this function. See the + * {file:file_uploads.html File Upload Documentation} for details on the file + * upload workflow. + */ +export const editGroup = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Group activity stream + * Returns the current user's group-specific activity stream, paginated. + * + * For full documentation, see the API documentation for the user activity + * stream, in the user api. + */ +export const groupActivityStream = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/activity_stream', + ...options + }); +}; + +/** + * Group activity stream summary + * Returns a summary of the current user's group-specific activity stream. + * + * For full documentation, see the API documentation for the user activity + * stream summary, in the user api. + */ +export const groupActivityStreamSummary = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/activity_stream/summary', + ...options + }); +}; + +/** + * Redirect to the assignment override for a group + * Responds with a redirect to the override for the given group, if any + * (404 otherwise). + */ +export const redirectToAssignmentOverrideForGroup = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/assignments/{assignment_id}/override', + ...options + }); +}; + +/** + * List collaborations + * A paginated list of collaborations the current user has access to in the + * context of the course provided in the url. NOTE: this only returns + * ExternalToolCollaboration type collaborations. + * + * curl https:///api/v1/courses/1/collaborations/ + */ +export const listCollaborationsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/collaborations', + ...options + }); +}; + +/** + * List conferences + * Retrieve the paginated list of conferences for this context + * + * This API returns a JSON object containing the list of conferences, + * the key for the list of conferences is "conferences" + */ +export const listConferencesGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/conferences', + ...options + }); +}; + +/** + * List content exports + * A paginated list of the past and pending content export jobs for a course, + * group, or user. Exports are returned newest first. + */ +export const listContentExportsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_exports', + ...options + }); +}; + +/** + * Export content + * Begin a content export job for a course, group, or user. + * + * You can use the {api:ProgressController#show Progress API} to track the + * progress of the export. The migration's progress is linked to with the + * _progress_url_ value. + * + * When the export completes, use the {api:ContentExportsApiController#show Show content export} endpoint + * to retrieve a download URL for the exported content. + */ +export const exportContentGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_exports', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Show content export + * Get information about a single content export. + */ +export const showContentExportGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_exports/{id}', + ...options + }); +}; + +/** + * List licenses + * A paginated list of licenses that can be applied + */ +export const listLicensesGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_licenses', + ...options + }); +}; + +/** + * List content migrations + * Returns paginated content migrations + */ +export const listContentMigrationsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_migrations', + ...options + }); +}; + +/** + * Create a content migration + * Create a content migration. If the migration requires a file to be uploaded + * the actual processing of the file will start once the file upload process is completed. + * File uploading works as described in the {file:file_uploads.html File Upload Documentation} + * except that the values are set on a *pre_attachment* sub-hash. + * + * For migrations that don't require a file to be uploaded, like course copy, the + * processing will begin as soon as the migration is created. + * + * You can use the {api:ProgressController#show Progress API} to track the + * progress of the migration. The migration's progress is linked to with the + * _progress_url_ value. + * + * The two general workflows are: + * + * If no file upload is needed: + * + * 1. POST to create + * 2. Use the {api:ProgressController#show Progress} specified in _progress_url_ to monitor progress + * + * For file uploading: + * + * 1. POST to create with file info in *pre_attachment* + * 2. Do {file:file_uploads.html file upload processing} using the data in the *pre_attachment* data + * 3. {api:ContentMigrationsController#show GET} the ContentMigration + * 4. Use the {api:ProgressController#show Progress} specified in _progress_url_ to monitor progress + * + * (required if doing .zip file upload) + */ +export const createContentMigrationGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_migrations', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List Migration Systems + * Lists the currently available migration types. These values may change. + */ +export const listMigrationSystemsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_migrations/migrators', + ...options + }); +}; + +/** + * List migration issues + * Returns paginated migration issues + */ +export const listMigrationIssuesGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_migrations/{content_migration_id}/migration_issues', + ...options + }); +}; + +/** + * Get a migration issue + * Returns data on an individual migration issue + */ +export const getMigrationIssueGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_migrations/{content_migration_id}/migration_issues/{id}', + ...options + }); +}; + +/** + * Update a migration issue + * Update the workflow_state of a migration issue + */ +export const updateMigrationIssueGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_migrations/{content_migration_id}/migration_issues/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get a content migration + * Returns data on an individual content migration + */ +export const getContentMigrationGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_migrations/{id}', + ...options + }); +}; + +/** + * Update a content migration + * Update a content migration. Takes same arguments as create except that you + * can't change the migration type. However, changing most settings after the + * migration process has started will not do anything. Generally updating the + * content migration will be used when there is a file upload problem. If the + * first upload has a problem you can supply new _pre_attachment_ values to + * start the process again. + */ +export const updateContentMigrationGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/content_migrations/{id}', + ...options + }); +}; + +/** + * List discussion topics + * Returns the paginated list of discussion topics for this course or group. + */ +export const listDiscussionTopicsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics', + ...options + }); +}; + +/** + * Create a new discussion topic + * Create an new discussion topic for the course or group. + */ +export const createNewDiscussionTopicGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Reorder pinned topics + * Puts the pinned discussion topics in the specified order. + * All pinned topics should be included. + */ +export const reorderPinnedTopicsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/reorder', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a topic + * Deletes the discussion topic. This will also delete the assignment, if it's + * an assignment discussion. + */ +export const deleteTopicGroups = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}', + ...options + }); +}; + +/** + * Get a single topic + * Returns data on an individual discussion topic. See the List action for the response formatting. + */ +export const getSingleTopicGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}', + ...options + }); +}; + +/** + * Update a topic + * Update an existing discussion topic for the course or group. + */ +export const updateTopicGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List topic entries + * Retrieve the (paginated) top-level entries in a discussion topic. + * + * May require (depending on the topic) that the user has posted in the topic. + * If it is required, and the user has not posted, will respond with a 403 + * Forbidden status and the body 'require_initial_post'. + * + * Will include the 10 most recent replies, if any, for each entry returned. + * + * If the topic is a root topic with children corresponding to groups of a + * group assignment, entries from those subtopics for which the user belongs + * to the corresponding group will be returned. + * + * Ordering of returned entries is newest-first by posting timestamp (reply + * activity is ignored). + */ +export const listTopicEntriesGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries', + ...options + }); +}; + +/** + * Post an entry + * Create a new entry in a discussion topic. Returns a json representation of + * the created entry (see documentation for 'entries' method) on success. + */ +export const postEntryGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Rate entry + * Rate a discussion entry. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const rateEntryGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{entry_id}/rating', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Mark entry as unread + * Mark a discussion entry as unread. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markEntryAsUnreadGroups = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{entry_id}/read', + ...options + }); +}; + +/** + * Mark entry as read + * Mark a discussion entry as read. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markEntryAsReadGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{entry_id}/read', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List entry replies + * Retrieve the (paginated) replies to a top-level entry in a discussion + * topic. + * + * May require (depending on the topic) that the user has posted in the topic. + * If it is required, and the user has not posted, will respond with a 403 + * Forbidden status and the body 'require_initial_post'. + * + * Ordering of returned entries is newest-first by creation timestamp. + */ +export const listEntryRepliesGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{entry_id}/replies', + ...options + }); +}; + +/** + * Post a reply + * Add a reply to an entry in a discussion topic. Returns a json + * representation of the created reply (see documentation for 'replies' + * method) on success. + * + * May require (depending on the topic) that the user has posted in the topic. + * If it is required, and the user has not posted, will respond with a 403 + * Forbidden status and the body 'require_initial_post'. + */ +export const postReplyGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{entry_id}/replies', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete an entry + * Delete a discussion entry. + * + * The entry must have been created by the current user, or the current user + * must have admin rights to the discussion. If the delete is not allowed, a 401 will be returned. + * + * The discussion will be marked deleted, and the user_id and message will be cleared out. + */ +export const deleteEntryGroups = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{id}', + ...options + }); +}; + +/** + * Update an entry + * Update an existing discussion entry. + * + * The entry must have been created by the current user, or the current user + * must have admin rights to the discussion. If the edit is not allowed, a 401 will be returned. + */ +export const updateEntryGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List entries + * Retrieve a paginated list of discussion entries, given a list of ids. + * + * May require (depending on the topic) that the user has posted in the topic. + * If it is required, and the user has not posted, will respond with a 403 + * Forbidden status and the body 'require_initial_post'. + */ +export const listEntriesGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entry_list', + ...options + }); +}; + +/** + * Mark topic as unread + * Mark the initial text of the discussion topic as unread. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markTopicAsUnreadGroups = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/read', + ...options + }); +}; + +/** + * Mark topic as read + * Mark the initial text of the discussion topic as read. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markTopicAsReadGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/read', + ...options + }); +}; + +/** + * Mark all entries as unread + * Mark the discussion topic and all its entries as unread. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markAllEntriesAsUnreadGroups = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/read_all', + ...options + }); +}; + +/** + * Mark all entries as read + * Mark the discussion topic and all its entries as read. + * + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markAllEntriesAsReadGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/read_all', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Unsubscribe from a topic + * Unsubscribe from a topic to stop receiving notifications about new entries + * + * On success, the response will be 204 No Content with an empty body + */ +export const unsubscribeFromTopicGroups = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/subscribed', + ...options + }); +}; + +/** + * Subscribe to a topic + * Subscribe to a topic to receive notifications about new entries + * + * On success, the response will be 204 No Content with an empty body + */ +export const subscribeToTopicGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/subscribed', + ...options + }); +}; + +/** + * Get the full topic + * Return a cached structure of the discussion topic, containing all entries, + * their authors, and their message bodies. + * + * May require (depending on the topic) that the user has posted in the topic. + * If it is required, and the user has not posted, will respond with a 403 + * Forbidden status and the body 'require_initial_post'. + * + * In some rare situations, this cached structure may not be available yet. In + * that case, the server will respond with a 503 error, and the caller should + * try again soon. + * + * The response is an object containing the following keys: + * * "participants": A list of summary information on users who have posted to + * the discussion. Each value is an object containing their id, display_name, + * and avatar_url. + * * "unread_entries": A list of entry ids that are unread by the current + * user. this implies that any entry not in this list is read. + * * "entry_ratings": A map of entry ids to ratings by the current user. Entries + * not in this list have no rating. Only populated if rating is enabled. + * * "forced_entries": A list of entry ids that have forced_read_state set to + * true. This flag is meant to indicate the entry's read_state has been + * manually set to 'unread' by the user, so the entry should not be + * automatically marked as read. + * * "view": A threaded view of all the entries in the discussion, containing + * the id, user_id, and message. + * * "new_entries": Because this view is eventually consistent, it's possible + * that newly created or updated entries won't yet be reflected in the view. + * If the application wants to also get a flat list of all entries not yet + * reflected in the view, pass include_new_entries=1 to the request and this + * array of entries will be returned. These entries are returned in a flat + * array, in ascending created_at order. + */ +export const getFullTopicGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/view', + ...options + }); +}; + +/** + * List external feeds + * Returns the paginated list of External Feeds this course or group. + */ +export const listExternalFeedsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/external_feeds', + ...options + }); +}; + +/** + * Create an external feed + * Create a new external feed for the course or group. + */ +export const createExternalFeedGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/external_feeds', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete an external feed + * Deletes the external feed. + */ +export const deleteExternalFeedGroups = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/external_feeds/{external_feed_id}', + ...options + }); +}; + +/** + * List external tools + * Returns the paginated list of external tools for the current context. + * See the get request docs for a single tool for a list of properties on an external tool. + */ +export const listExternalToolsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/external_tools', + ...options + }); +}; + +/** + * Upload a file + * Upload a file to the group. + * + * This API endpoint is the first step in uploading a file to a group. + * See the {file:file_uploads.html File Upload Documentation} for details on + * the file upload workflow. + * + * Only those with the "Manage Files" permission on a group can upload files + * to the group. By default, this is anybody participating in the + * group, or any admin over the group. + */ +export const uploadFileToGroup = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/files', + ...options + }); +}; + +/** + * Get quota information + * Returns the total and used storage quota for the course, group, or user. + */ +export const getQuotaInformationGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/files/quota', + ...options + }); +}; + +/** + * Get file + * Returns the standard attachment json object + */ +export const getFileGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/files/{id}', + ...options + }); +}; + +/** + * List all folders + * Returns the paginated list of all folders for the given context. This will + * be returned as a flat list containing all subfolders as well. + */ +export const listAllFoldersGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/folders', + ...options + }); +}; + +/** + * Create folder + * Creates a folder in the specified context + */ +export const createFolderGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/folders', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Resolve path + * Given the full path to a folder, returns a list of all Folders in the path hierarchy, + * starting at the root folder, and ending at the requested folder. The given path is + * relative to the context's root folder and does not include the root folder's name + * (e.g., "course files"). If an empty path is given, the context's root folder alone + * is returned. Otherwise, if no folder exists with the given full path, a Not Found + * error is returned. + */ +export const resolvePathGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/folders/by_path', + ...options + }); +}; + +/** + * Resolve path + * Given the full path to a folder, returns a list of all Folders in the path hierarchy, + * starting at the root folder, and ending at the requested folder. The given path is + * relative to the context's root folder and does not include the root folder's name + * (e.g., "course files"). If an empty path is given, the context's root folder alone + * is returned. Otherwise, if no folder exists with the given full path, a Not Found + * error is returned. + */ +export const resolvePathGroupsFullPath = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/folders/by_path/*full_path', + ...options + }); +}; + +/** + * Get folder + * Returns the details for a folder + * + * You can get the root folder from a context by using 'root' as the :id. + * For example, you could get the root folder for a course like: + */ +export const getFolderGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/folders/{id}', + ...options + }); +}; + +/** + * Show front page + * Retrieve the content of the front page + */ +export const showFrontPageGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/front_page', + ...options + }); +}; + +/** + * Update/create front page + * Update the title or contents of the front page + */ +export const updateCreateFrontPageGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/front_page', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Invite others to a group + * Sends an invitation to all supplied email addresses which will allow the + * receivers to join the group. + */ +export const inviteOthersToGroup = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/invite', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List group memberships + * A paginated list of the members of a group. + */ +export const listGroupMemberships = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/memberships', + ...options + }); +}; + +/** + * Create a membership + * Join, or request to join, a group, depending on the join_level of the + * group. If the membership or join request already exists, then it is simply + * returned + */ +export const createMembership = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/memberships', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Leave a group + * Leave a group if you are allowed to leave (some groups, such as sets of + * course groups created by teachers, cannot be left). You may also use 'self' + * in place of a membership_id. + */ +export const leaveGroupMemberships = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/memberships/{membership_id}', + ...options + }); +}; + +/** + * Get a single group membership + * Returns the group membership with the given membership id or user id. + */ +export const getSingleGroupMembershipMemberships = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/memberships/{membership_id}', + ...options + }); +}; + +/** + * Update a membership + * Accept a membership request, or add/remove moderator rights. + */ +export const updateMembershipMemberships = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/memberships/{membership_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List pages + * A paginated list of the wiki pages associated with a course or group + */ +export const listPagesGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/pages', + ...options + }); +}; + +/** + * Create page + * Create a new wiki page + */ +export const createPageGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/pages', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete page + * Delete a wiki page + */ +export const deletePageGroups = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/pages/{url}', + ...options + }); +}; + +/** + * Show page + * Retrieve the content of a wiki page + */ +export const showPageGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/pages/{url}', + ...options + }); +}; + +/** + * Update/create page + * Update the title or contents of a wiki page + */ +export const updateCreatePageGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/pages/{url}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List revisions + * A paginated list of the revisions of a page. Callers must have update rights on the page in order to see page history. + */ +export const listRevisionsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/pages/{url}/revisions', + ...options + }); +}; + +/** + * Show revision + * Retrieve the metadata and optionally content of a revision of the page. + * Note that retrieving historic versions of pages requires edit rights. + */ +export const showRevisionGroupsLatest = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/pages/{url}/revisions/latest', + ...options + }); +}; + +/** + * Show revision + * Retrieve the metadata and optionally content of a revision of the page. + * Note that retrieving historic versions of pages requires edit rights. + */ +export const showRevisionGroupsRevisionId = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/pages/{url}/revisions/{revision_id}', + ...options + }); +}; + +/** + * Revert to revision + * Revert a page to a prior revision. + */ +export const revertToRevisionGroups = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/pages/{url}/revisions/{revision_id}', + ...options + }); +}; + +/** + * Permissions + * Returns permission information for the calling user in the given group. + * See also the {api:AccountsController#permissions Account} and + * {api:CoursesController#permissions Course} counterparts. + */ +export const groupPermission = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/groups/{group_id}/permissions', + ...options + }); +}; + +/** + * List potential members + * A paginated list of the users who can potentially be added to a + * collaboration in the given context. + * + * For courses, this consists of all enrolled users. For groups, it is comprised of the + * group members plus the admins of the course containing the group. + */ +export const listPotentialMembersGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/potential_collaborators', + ...options + }); +}; + +/** + * Preview processed html + * Preview html content processed for this group + */ +export const previewProcessedHtmlGroup = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/preview_html', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List available tabs for a course or group + * Returns a paginated list of navigation tabs available in the current context. + */ +export const listAvailableTabsForCourseOrGroupGroups = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/tabs', + ...options + }); +}; + +/** + * Remove usage rights + * Removes copyright and license information associated with one or more files + */ +export const removeUsageRightsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/groups/{group_id}/usage_rights', + ...options + }); +}; + +/** + * Set usage rights + * Sets copyright and license information for one or more files + */ +export const setUsageRightsGroups = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/usage_rights', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List group's users + * Returns a paginated list of users in the group. + */ +export const listGroupSUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/users', + ...options + }); +}; + +/** + * Leave a group + * Leave a group if you are allowed to leave (some groups, such as sets of + * course groups created by teachers, cannot be left). You may also use 'self' + * in place of a membership_id. + */ +export const leaveGroupUsers = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/users/{user_id}', + ...options + }); +}; + +/** + * Get a single group membership + * Returns the group membership with the given membership id or user id. + */ +export const getSingleGroupMembershipUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/users/{user_id}', + ...options + }); +}; + +/** + * Update a membership + * Accept a membership request, or add/remove moderator rights. + */ +export const updateMembershipUsers = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/groups/{group_id}/users/{user_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Create JWT + * Create a unique jwt for using with other canvas services + * + * Generates a different JWT each time it's called, each one expires + * after a short window (1 hour) + */ +export const createJwt = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/jwts', + ...options + }); +}; + +/** + * Refresh JWT + * Refresh a JWT for use with other canvas services + * + * Generates a different JWT each time it's called, each one expires + * after a short window (1 hour). + */ +export const refreshJwt = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/jwts/refresh', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Show an outcome + * Returns the details of the outcome with the given id. + */ +export const showOutcome = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/outcomes/{id}', + ...options + }); +}; + +/** + * Update an outcome + * Modify an existing outcome. Fields not provided are left as is; + * unrecognized fields are ignored. + * + * If any new ratings are provided, the combination of all new ratings + * provided completely replace any existing embedded rubric criterion; it is + * not possible to tweak the ratings of the embedded rubric criterion. + * + * A new embedded rubric criterion's mastery_points default to the maximum + * points in the highest rating if not specified in the mastery_points + * parameter. Any new ratings lacking a description are given a default of "No + * description". Any new ratings lacking a point value are given a default of + * 0. + */ +export const updateOutcome = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/outcomes/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List planner items + * Retrieve the paginated list of objects to be shown on the planner for the + * current user with the associated planner override to override an item's + * visibility if set. + * + * [ + * { + * "context_type": "Course", + * "course_id": 1, + * "visible_in_planner": true, // Whether or not it is displayed on the student planner + * "planner_override": { ... planner override object ... }, // Associated PlannerOverride object if user has toggled visibility for the object on the planner + * "submissions": false, // The statuses of the user's submissions for this object + * "plannable_id": "123", + * "plannable_type": "discussion_topic", + * "plannable": { ... discussion topic object }, + * "html_url": "/courses/1/discussion_topics/8" + * }, + * { + * "context_type": "Course", + * "course_id": 1, + * "visible_in_planner": true, + * "planner_override": { + * "id": 3, + * "plannable_type": "Assignment", + * "plannable_id": 1, + * "user_id": 2, + * "workflow_state": "active", + * "marked_complete": true, // A user-defined setting for marking items complete in the planner + * "dismissed": false, // A user-defined setting for hiding items from the opportunities list + * "deleted_at": null, + * "created_at": "2017-05-18T18:35:55Z", + * "updated_at": "2017-05-18T18:35:55Z" + * }, + * "submissions": { // The status as it pertains to the current user + * "excused": false, + * "graded": false, + * "late": false, + * "missing": true, + * "needs_grading": false, + * "with_feedback": false + * }, + * "plannable_id": "456", + * "plannable_type": "assignment", + * "plannable": { ... assignment object ... }, + * "html_url": "http://canvas.instructure.com/courses/1/assignments/1#submit" + * }, + * { + * "visible_in_planner": true, + * "planner_override": null, + * "submissions": false, // false if no associated assignment exists for the plannable item + * "plannable_id": "789", + * "plannable_type": "planner_note", + * "plannable": { + * "id": 1, + * "todo_date": "2017-05-30T06:00:00Z", + * "title": "hello", + * "details": "world", + * "user_id": 2, + * "course_id": null, + * "workflow_state": "active", + * "created_at": "2017-05-30T16:29:04Z", + * "updated_at": "2017-05-30T16:29:15Z" + * }, + * "html_url": "http://canvas.instructure.com/api/v1/planner_notes.1" + * } + * ] + */ +export const listPlannerItems = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/planner/items', + ...options + }); +}; + +/** + * List planner overrides + * Retrieve a planner override for the current user + */ +export const listPlannerOverrides = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/planner/overrides', + ...options + }); +}; + +/** + * Create a planner override + * Create a planner override for the current user + */ +export const createPlannerOverride = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/planner/overrides', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a planner override + * Delete a planner override for the current user + */ +export const deletePlannerOverride = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/planner/overrides/{id}', + ...options + }); +}; + +/** + * Show a planner override + * Retrieve a planner override for the current user + */ +export const showPlannerOverride = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/planner/overrides/{id}', + ...options + }); +}; + +/** + * Update a planner override + * Update a planner override's visibilty for the current user + */ +export const updatePlannerOverride = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/planner/overrides/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List planner notes + * Retrieve the paginated list of planner notes + * + * Retrieve planner note for a user + */ +export const listPlannerNotes = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/planner_notes', + ...options + }); +}; + +/** + * Create a planner note + * Create a planner note for the current user + */ +export const createPlannerNote = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/planner_notes', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a planner note + * Delete a planner note for the current user + */ +export const deletePlannerNote = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/planner_notes/{id}', + ...options + }); +}; + +/** + * Show a PlannerNote + * Retrieve a planner note for the current user + */ +export const showPlannernote = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/planner_notes/{id}', + ...options + }); +}; + +/** + * Update a PlannerNote + * Update a planner note for the current user + */ +export const updatePlannernote = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/planner_notes/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List closed poll sessions + * A paginated list of all closed poll sessions available to the current user. + */ +export const listClosedPollSessions = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/poll_sessions/closed', + ...options + }); +}; + +/** + * List opened poll sessions + * A paginated list of all opened poll sessions available to the current user. + */ +export const listOpenedPollSessions = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/poll_sessions/opened', + ...options + }); +}; + +/** + * List polls + * Returns the paginated list of polls for the current user. + */ +export const listPolls = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls', + ...options + }); +}; + +/** + * Create a single poll + * Create a new poll for the current user + */ +export const createSinglePoll = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a poll + * 204 No Content response code is returned if the deletion was successful. + */ +export const deletePoll = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{id}', + ...options + }); +}; + +/** + * Get a single poll + * Returns the poll with the given id + */ +export const getSinglePoll = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{id}', + ...options + }); +}; + +/** + * Update a single poll + * Update an existing poll belonging to the current user + */ +export const updateSinglePoll = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List poll choices in a poll + * Returns the paginated list of PollChoices in this poll. + */ +export const listPollChoicesInPoll = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_choices', + ...options + }); +}; + +/** + * Create a single poll choice + * Create a new poll choice for this poll + */ +export const createSinglePollChoice = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_choices', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a poll choice + * 204 No Content response code is returned if the deletion was successful. + */ +export const deletePollChoice = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_choices/{id}', + ...options + }); +}; + +/** + * Get a single poll choice + * Returns the poll choice with the given id + */ +export const getSinglePollChoice = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_choices/{id}', + ...options + }); +}; + +/** + * Update a single poll choice + * Update an existing poll choice for this poll + */ +export const updateSinglePollChoice = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_choices/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List poll sessions for a poll + * Returns the paginated list of PollSessions in this poll. + */ +export const listPollSessionsForPoll = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_sessions', + ...options + }); +}; + +/** + * Create a single poll session + * Create a new poll session for this poll + */ +export const createSinglePollSession = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_sessions', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete a poll session + * 204 No Content response code is returned if the deletion was successful. + */ +export const deletePollSession = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_sessions/{id}', + ...options + }); +}; + +/** + * Get the results for a single poll session + * Returns the poll session with the given id + */ +export const getResultsForSinglePollSession = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_sessions/{id}', + ...options + }); +}; + +/** + * Update a single poll session + * Update an existing poll session for this poll + */ +export const updateSinglePollSession = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_sessions/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Close an opened poll session + */ +export const closeOpenedPollSession = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_sessions/{id}/close', + ...options + }); +}; + +/** + * Open a poll session + */ +export const openPollSession = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_sessions/{id}/open', + ...options + }); +}; + +/** + * Create a single poll submission + * Create a new poll submission for this poll session + */ +export const createSinglePollSubmission = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_sessions/{poll_session_id}/poll_submissions', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get a single poll submission + * Returns the poll submission with the given id + */ +export const getSinglePollSubmission = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/polls/{poll_id}/poll_sessions/{poll_session_id}/poll_submissions/{id}', + ...options + }); +}; + +/** + * Query progress + * Return completion and status information about an asynchronous job + */ +export const queryProgress = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/progress/{id}', + ...options + }); +}; + +/** + * Get all quiz submission questions. + * Get a list of all the question records for this quiz submission. + * + * 200 OK response code is returned if the request was successful. + */ +export const getAllQuizSubmissionQuestions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/quiz_submissions/{quiz_submission_id}/questions', + ...options + }); +}; + +/** + * Answering questions + * Provide or update an answer to one or more QuizQuestions. + */ +export const answeringQuestions = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/quiz_submissions/{quiz_submission_id}/questions', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Flagging a question. + * Set a flag on a quiz question to indicate that you want to return to it + * later. + */ +export const flaggingQuestion = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/quiz_submissions/{quiz_submission_id}/questions/{id}/flag', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Unflagging a question. + * Remove the flag that you previously set on a quiz question after you've + * returned to it. + */ +export const unflaggingQuestion = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/quiz_submissions/{quiz_submission_id}/questions/{id}/unflag', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List all courses + * A paginated list of all courses visible in the public index + */ +export const listAllCourses = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/search/all_courses', + ...options + }); +}; + +/** + * Find recipients + * Find valid recipients (users, courses and groups) that the current user + * can send messages to. The /api/v1/search/recipients path is the preferred + * endpoint, /api/v1/conversations/find_recipients is deprecated. + * + * Pagination is supported. + */ +export const findRecipientsSearch = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/search/recipients', + ...options + }); +}; + +/** + * Redirect to the assignment override for a section + * Responds with a redirect to the override for the given section, if any + * (404 otherwise). + */ +export const redirectToAssignmentOverrideForSection = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{course_section_id}/assignments/{assignment_id}/override', + ...options + }); +}; + +/** + * Delete a section + * Delete an existing section. Returns the former Section. + */ +export const deleteSection = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{id}', + ...options + }); +}; + +/** + * Get section information + * Gets details about a specific section + */ +export const getSectionInformationSections = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{id}', + ...options + }); +}; + +/** + * Edit a section + * Modify an existing section. + */ +export const editSection = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * De-cross-list a Section + * Undo cross-listing of a Section, returning it to its original course. + */ +export const deCrossListSection = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{id}/crosslist', + ...options + }); +}; + +/** + * Cross-list a Section + * Move the Section to another course. The new course may be in a different account (department), + * but must belong to the same root account (institution). + */ +export const crossListSection = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{id}/crosslist/{new_course_id}', + ...options + }); +}; + +/** + * Get all Peer Reviews + * Get a list of all Peer Reviews for this assignment + */ +export const getAllPeerReviewsSectionsPeerReviews = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/peer_reviews', + ...options + }); +}; + +/** + * Submission Summary + * Returns the number of submissions for the given assignment based on gradeable students + * that fall into three categories: graded, ungraded, not submitted. + */ +export const submissionSummarySections = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submission_summary', + ...options + }); +}; + +/** + * List assignment submissions + * A paginated list of all existing submissions for an assignment. + */ +export const listAssignmentSubmissionsSections = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions', + ...options + }); +}; + +/** + * Submit an assignment + * Make a submission for an assignment. You must be enrolled as a student in + * the course/section to do this. + * + * All online turn-in submission types are supported in this API. However, + * there are a few things that are not yet supported: + * + * * Files can be submitted based on a file ID of a user or group file. However, there is no API yet for listing the user and group files, or uploading new files via the API. A file upload API is coming soon. + * * Media comments can be submitted, however, there is no API yet for creating a media comment to submit. + * * Integration with Google Docs is not yet supported. + */ +export const submitAssignmentSections = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Grade or comment on multiple submissions + * Update the grading and comments on multiple student's assignment + * submissions in an asynchronous job. + * + * The user must have permission to manage grades in the appropriate context + * (course or section). + */ +export const gradeOrCommentOnMultipleSubmissionsSectionsAssignments = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/update_grades', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete Peer Review + * Delete a peer review for the assignment + */ +export const deletePeerReviewSections = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews', + ...options + }); +}; + +/** + * Get all Peer Reviews + * Get a list of all Peer Reviews for this assignment + */ +export const getAllPeerReviewsSectionsSubmissions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews', + ...options + }); +}; + +/** + * Create Peer Review + * Create a peer review for the assignment + */ +export const createPeerReviewSections = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get a single submission + * Get a single submission, based on user id. + */ +export const getSingleSubmissionSections = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{user_id}', + ...options + }); +}; + +/** + * Grade or comment on a submission + * Comment on and/or update the grading for a student's assignment submission. + * If any submission or rubric_assessment arguments are provided, the user + * must have permission to manage grades in the appropriate context (course or + * section). + */ +export const gradeOrCommentOnSubmissionSections = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{user_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Upload a file + * Upload a file to a submission. + * + * This API endpoint is the first step in uploading a file to a submission as a student. + * See the {file:file_uploads.html File Upload Documentation} for details on the file upload workflow. + * + * The final step of the file upload workflow will return the attachment data, + * including the new file id. The caller can then POST to submit the + * +online_upload+ assignment with these file ids. + */ +export const uploadFileSections = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{user_id}/files', + ...options + }); +}; + +/** + * Mark submission as unread + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markSubmissionAsUnreadSections = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{user_id}/read', + ...options + }); +}; + +/** + * Mark submission as read + * No request fields are necessary. + * + * On success, the response will be 204 No Content with an empty body. + */ +export const markSubmissionAsReadSections = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{user_id}/read', + ...options + }); +}; + +/** + * List enrollments + * Depending on the URL given, return a paginated list of either (1) all of + * the enrollments in a course, (2) all of the enrollments in a section or (3) + * all of a user's enrollments. This includes student, teacher, TA, and + * observer enrollments. + * + * If a user has multiple enrollments in a context (e.g. as a teacher + * and a student or in multiple course sections), each enrollment will be + * listed separately. + * + * note: Currently, only a root level admin user can return other users' enrollments. A + * user can, however, return his/her own enrollments. + */ +export const listEnrollmentsSections = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/sections/{section_id}/enrollments', + ...options + }); +}; + +/** + * Enroll a user + * Create a new user enrollment for a course or section. + */ +export const enrollUserSections = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/enrollments', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List submissions for multiple assignments + * A paginated list of all existing submissions for a given set of students and assignments. + */ +export const listSubmissionsForMultipleAssignmentsSections = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/sections/{section_id}/students/submissions', + ...options + }); +}; + +/** + * Grade or comment on multiple submissions + * Update the grading and comments on multiple student's assignment + * submissions in an asynchronous job. + * + * The user must have permission to manage grades in the appropriate context + * (course or section). + */ +export const gradeOrCommentOnMultipleSubmissionsSectionsSubmissions = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/sections/{section_id}/submissions/update_grades', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Get Kaltura config + * Return the config information for the Kaltura plugin in json format. + */ +export const getKalturaConfig = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/services/kaltura', + ...options + }); +}; + +/** + * Start Kaltura session + * Start a new Kaltura session, so that new media can be recorded and uploaded + * to this Canvas instance's Kaltura instance. + */ +export const startKalturaSession = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/services/kaltura_session', + ...options + }); +}; + +/** + * Un-share a BrandConfig (Theme) + * Delete a SharedBrandConfig, which will unshare it so you nor anyone else in + * your account will see it as an option to pick from. + */ +export const unShareBrandconfigTheme = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/shared_brand_configs/{id}', + ...options + }); +}; + +/** + * List the activity stream + * Returns the current user's global activity stream, paginated. + * + * There are many types of objects that can be returned in the activity + * stream. All object types have the same basic set of shared attributes: + * !!!javascript + * { + * 'created_at': '2011-07-13T09:12:00Z', + * 'updated_at': '2011-07-25T08:52:41Z', + * 'id': 1234, + * 'title': 'Stream Item Subject', + * 'message': 'This is the body text of the activity stream item. It is plain-text, and can be multiple paragraphs.', + * 'type': 'DiscussionTopic|Conversation|Message|Submission|Conference|Collaboration|AssessmentRequest...', + * 'read_state': false, + * 'context_type': 'course', // course|group + * 'course_id': 1, + * 'group_id': null, + * 'html_url': "http://..." // URL to the Canvas web UI for this stream item + * } + * In addition, each item type has its own set of attributes available. + * DiscussionTopic: + * 'type': 'DiscussionTopic', + * 'discussion_topic_id': 1234, + * 'total_root_discussion_entries': 5, + * 'require_initial_post': true, + * 'user_has_posted': true, + * 'root_discussion_entries': { + * ... + * } + * For DiscussionTopic, the message is truncated at 4kb. + * Announcement: + * 'type': 'Announcement', + * 'announcement_id': 1234, + * 'total_root_discussion_entries': 5, + * 'require_initial_post': true, + * 'user_has_posted': null, + * 'root_discussion_entries': { + * ... + * For Announcement, the message is truncated at 4kb. + * Conversation: + * 'type': 'Conversation', + * 'conversation_id': 1234, + * 'private': false, + * 'participant_count': 3, + * Message: + * 'type': 'Message', + * 'message_id': 1234, + * 'notification_category': 'Assignment Graded' + * Submission: + * Returns an {api:Submissions:Submission Submission} with its Course and Assignment data. + * Conference: + * 'type': 'Conference', + * 'web_conference_id': 1234 + * Collaboration: + * 'type': 'Collaboration', + * 'collaboration_id': 1234 + * AssessmentRequest: + * 'type': 'AssessmentRequest', + * 'assessment_request_id': 1234 + */ +export const listActivityStreamActivityStream = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/activity_stream', + ...options + }); +}; + +/** + * Hide all stream items + * Hide all stream items for the user + */ +export const hideAllStreamItems = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/activity_stream', + ...options + }); +}; + +/** + * List the activity stream + * Returns the current user's global activity stream, paginated. + * + * There are many types of objects that can be returned in the activity + * stream. All object types have the same basic set of shared attributes: + * !!!javascript + * { + * 'created_at': '2011-07-13T09:12:00Z', + * 'updated_at': '2011-07-25T08:52:41Z', + * 'id': 1234, + * 'title': 'Stream Item Subject', + * 'message': 'This is the body text of the activity stream item. It is plain-text, and can be multiple paragraphs.', + * 'type': 'DiscussionTopic|Conversation|Message|Submission|Conference|Collaboration|AssessmentRequest...', + * 'read_state': false, + * 'context_type': 'course', // course|group + * 'course_id': 1, + * 'group_id': null, + * 'html_url': "http://..." // URL to the Canvas web UI for this stream item + * } + * + * In addition, each item type has its own set of attributes available. + * + * DiscussionTopic: + * + * !!!javascript + * { + * 'type': 'DiscussionTopic', + * 'discussion_topic_id': 1234, + * 'total_root_discussion_entries': 5, + * 'require_initial_post': true, + * 'user_has_posted': true, + * 'root_discussion_entries': { + * ... + * } + * } + * + * For DiscussionTopic, the message is truncated at 4kb. + * + * Announcement: + * + * !!!javascript + * { + * 'type': 'Announcement', + * 'announcement_id': 1234, + * 'total_root_discussion_entries': 5, + * 'require_initial_post': true, + * 'user_has_posted': null, + * 'root_discussion_entries': { + * ... + * } + * } + * + * For Announcement, the message is truncated at 4kb. + * + * Conversation: + * + * !!!javascript + * { + * 'type': 'Conversation', + * 'conversation_id': 1234, + * 'private': false, + * 'participant_count': 3, + * } + * + * Message: + * + * !!!javascript + * { + * 'type': 'Message', + * 'message_id': 1234, + * 'notification_category': 'Assignment Graded' + * } + * + * Submission: + * + * Returns an {api:Submissions:Submission Submission} with its Course and Assignment data. + * + * Conference: + * + * !!!javascript + * { + * 'type': 'Conference', + * 'web_conference_id': 1234 + * } + * + * Collaboration: + * + * !!!javascript + * { + * 'type': 'Collaboration', + * 'collaboration_id': 1234 + * } + * + * AssessmentRequest: + * + * !!!javascript + * { + * 'type': 'AssessmentRequest', + * 'assessment_request_id': 1234 + * } + */ +export const listActivityStreamSelf = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/activity_stream', + ...options + }); +}; + +/** + * Activity stream summary + * Returns a summary of the current user's global activity stream. + */ +export const activityStreamSummary = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/activity_stream/summary', + ...options + }); +}; + +/** + * Hide a stream item + * Hide the given stream item. + */ +export const hideStreamItem = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/activity_stream/{id}', + ...options + }); +}; + +/** + * List bookmarks + * Returns the paginated list of bookmarks. + */ +export const listBookmarks = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/bookmarks', + ...options + }); +}; + +/** + * Create bookmark + * Creates a bookmark. + */ +export const createBookmark = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/bookmarks', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Delete bookmark + * Deletes a bookmark + */ +export const deleteBookmark = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/bookmarks/{id}', + ...options + }); +}; + +/** + * Get bookmark + * Returns the details for a bookmark. + */ +export const getBookmark = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/bookmarks/{id}', + ...options + }); +}; + +/** + * Update bookmark + * Updates a bookmark + */ +export const updateBookmark = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/bookmarks/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Delete a push notification endpoint + */ +export const deletePushNotificationEndpoint = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/communication_channels/push', + ...options + }); +}; + +/** + * Update preferences by category + * Change the preferences for multiple notifications based on the category for a single communication channel + */ +export const updatePreferencesByCategory = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/communication_channels/{communication_channel_id}/notification_preference_categories/{category}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Update multiple preferences + * Change the preferences for multiple notifications for a single communication channel at once + */ +export const updateMultiplePreferencesCommunicationChannelId = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/communication_channels/{communication_channel_id}/notification_preferences', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Update a preference + * Change the preference for a single notification for a single communication channel + */ +export const updatePreferenceCommunicationChannelId = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/communication_channels/{communication_channel_id}/notification_preferences/{notification}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Update multiple preferences + * Change the preferences for multiple notifications for a single communication channel at once + */ +export const updateMultiplePreferencesType = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/communication_channels/{type}/{address}/notification_preferences', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Update a preference + * Change the preference for a single notification for a single communication channel + */ +export const updatePreferenceType = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/communication_channels/{type}/{address}/notification_preferences/{notification}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Clear course nicknames + * Remove all stored course nicknames. + */ +export const clearCourseNicknames = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/course_nicknames', + ...options + }); +}; + +/** + * List course nicknames + * Returns all course nicknames you have set. + */ +export const listCourseNicknames = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/course_nicknames', + ...options + }); +}; + +/** + * Remove course nickname + * Remove the nickname for the given course. + * Subsequent course API calls will return the actual name for the course. + */ +export const removeCourseNickname = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/course_nicknames/{course_id}', + ...options + }); +}; + +/** + * Get course nickname + * Returns the nickname for a specific course. + */ +export const getCourseNickname = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/course_nicknames/{course_id}', + ...options + }); +}; + +/** + * Set course nickname + * Set a nickname for the given course. This will replace the course's name + * in output of API calls you make subsequently, as well as in selected + * places in the Canvas web user interface. + */ +export const setCourseNickname = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/course_nicknames/{course_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Reset course favorites + * Reset the current user's course favorites to the default + * automatically generated list of enrolled courses + */ +export const resetCourseFavorites = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/favorites/courses', + ...options + }); +}; + +/** + * List favorite courses + * Retrieve the paginated list of favorite courses for the current user. If the user has not chosen + * any favorites, then a selection of currently enrolled courses will be returned. + * + * See the {api:CoursesController#index List courses API} for details on accepted include[] parameters. + */ +export const listFavoriteCourses = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/favorites/courses', + ...options + }); +}; + +/** + * Remove course from favorites + * Remove a course from the current user's favorites. + */ +export const removeCourseFromFavorites = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/favorites/courses/{id}', + ...options + }); +}; + +/** + * Add course to favorites + * Add a course to the current user's favorites. If the course is already + * in the user's favorites, nothing happens. + */ +export const addCourseToFavorites = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/favorites/courses/{id}', + ...options + }); +}; + +/** + * Reset group favorites + * Reset the current user's group favorites to the default + * automatically generated list of enrolled group + */ +export const resetGroupFavorites = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/favorites/groups', + ...options + }); +}; + +/** + * List favorite groups + * Retrieve the paginated list of favorite groups for the current user. If the user has not chosen + * any favorites, then a selection of groups that the user is a member of will be returned. + */ +export const listFavoriteGroups = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/favorites/groups', + ...options + }); +}; + +/** + * Remove group from favorites + * Remove a group from the current user's favorites. + */ +export const removeGroupFromFavorites = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/favorites/groups/{id}', + ...options + }); +}; + +/** + * Add group to favorites + * Add a group to the current user's favorites. If the group is already + * in the user's favorites, nothing happens. + */ +export const addGroupToFavorites = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/favorites/groups/{id}', + ...options + }); +}; + +/** + * List your groups + * Returns a paginated list of active groups for the current user. + */ +export const listYourGroups = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/groups', + ...options + }); +}; + +/** + * Get a Pandata Events jwt token and its expiration date + * Returns a jwt auth and props token that can be used to send events to + * Pandata. + * + * NOTE: This is currently only available to the mobile developer keys. + */ +export const getPandataEventsJwtTokenAndItsExpirationDate = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/pandata_events_token', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List the TODO items + * A paginated list of the current user's list of todo items, as seen on the user dashboard. + * + * There is a limit to the number of items returned. + * + * The `ignore` and `ignore_permanently` URLs can be used to update the user's + * preferences on what items will be displayed. + * Performing a DELETE request against the `ignore` URL will hide that item + * from future todo item requests, until the item changes. + * Performing a DELETE request against the `ignore_permanently` URL will hide + * that item forever. + */ +export const listTodoItems = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/todo', + ...options + }); +}; + +/** + * List counts for todo items + * Counts of different todo items such as the number of assignments needing grading as well as the number of assignments needing submitting. + * + * There is a limit to the number of todo items this endpoint will count. + * It will only look at the first 100 todo items for the user. If the user has more than 100 todo items this count may not be reliable. + * The largest reliable number for both counts is 100. + */ +export const listCountsForTodoItems = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/todo_item_count', + ...options + }); +}; + +/** + * List upcoming assignments, calendar events + * A paginated list of the current user's upcoming events. + */ +export const listUpcomingAssignmentsCalendarEvents = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/self/upcoming_events', + ...options + }); +}; + +/** + * Show user details + * Shows details for user. + * + * Also includes an attribute "permissions", a non-comprehensive list of permissions for the user. + * Example: + * !!!javascript + * "permissions": { + * "can_update_name": true, // Whether the user can update their name. + * "can_update_avatar": false // Whether the user can update their avatar. + * } + */ +export const showUserDetails = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}', + ...options + }); +}; + +/** + * Edit a user + * Modify an existing user. To modify a user's login, see the documentation for logins. + */ +export const editUser = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get custom colors + * Returns all custom colors that have been saved for a user. + */ +export const getCustomColors = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}/colors', + ...options + }); +}; + +/** + * Get custom color + * Returns the custom colors that have been saved for a user for a given context. + * + * The asset_string parameter should be in the format 'context_id', for example + * 'course_42'. + */ +export const getCustomColor = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}/colors/{asset_string}', + ...options + }); +}; + +/** + * Update custom color + * Updates a custom color for a user for a given context. This allows + * colors for the calendar and elsewhere to be customized on a user basis. + * + * The asset string parameter should be in the format 'context_id', for example + * 'course_42' + */ +export const updateCustomColor = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}/colors/{asset_string}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get dashboard positions + * Returns all dashboard positions that have been saved for a user. + */ +export const getDashboardPositions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}/dashboard_positions', + ...options + }); +}; + +/** + * Update dashboard positions + * Updates the dashboard positions for a user for a given context. This allows + * positions for the dashboard cards and elsewhere to be customized on a per + * user basis. + * + * The asset string parameter should be in the format 'context_id', for example + * 'course_42' + */ +export const updateDashboardPositions = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}/dashboard_positions', + ...options + }); +}; + +/** + * Merge user into another user + * Merge a user into another user. + * To merge users, the caller must have permissions to manage both users. This + * should be considered irreversible. This will delete the user and move all + * the data into the destination user. + * + * When finding users by SIS ids in different accounts the + * destination_account_id is required. + * + * The account can also be identified by passing the domain in destination_account_id. + */ +export const mergeUserIntoAnotherUserAccounts = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}/merge_into/accounts/{destination_account_id}/users/{destination_user_id}', + ...options + }); +}; + +/** + * Merge user into another user + * Merge a user into another user. + * To merge users, the caller must have permissions to manage both users. This + * should be considered irreversible. This will delete the user and move all + * the data into the destination user. + * + * When finding users by SIS ids in different accounts the + * destination_account_id is required. + * + * The account can also be identified by passing the domain in destination_account_id. + */ +export const mergeUserIntoAnotherUserDestinationUserId = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}/merge_into/{destination_user_id}', + ...options + }); +}; + +/** + * Update user settings. + * Update an existing user's settings. + */ +export const updateUserSettings = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}/settings', + ...options + }); +}; + +/** + * Split merged users into separate users + * Merged users cannot be fully restored to their previous state, but this will + * attempt to split as much as possible to the previous state. + * To split a merged user, the caller must have permissions to manage all of + * the users logins. If there are multiple users that have been merged into one + * user it will split each merge into a separate user. + * A split can only happen within 180 days of a user merge. A user merge deletes + * the previous user and may be permanently deleted. In this scenario we create + * a new user object and proceed to move as much as possible to the new user. + * The user object will not have preserved the name or settings from the + * previous user. Some items may have been deleted during a user_merge that + * cannot be restored, and/or the data has become stale because of other + * changes to the objects since the time of the user_merge. + */ +export const splitMergedUsersIntoSeparateUsers = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{id}/split', + ...options + }); +}; + +/** + * List avatar options + * A paginated list of the possible user avatar options that can be set with the user update endpoint. The response will be an array of avatar records. If the 'type' field is 'attachment', the record will include all the normal attachment json fields; otherwise it will include only the 'url' and 'display_name' fields. Additionally, all records will include a 'type' field and a 'token' field. The following explains each field in more detail + * type:: ["gravatar"|"attachment"|"no_pic"] The type of avatar record, for categorization purposes. + * url:: The url of the avatar + * token:: A unique representation of the avatar record which can be used to set the avatar with the user update endpoint. Note: this is an internal representation and is subject to change without notice. It should be consumed with this api endpoint and used in the user update endpoint, and should not be constructed by the client. + * display_name:: A textual description of the avatar record + * id:: ['attachment' type only] the internal id of the attachment + * content-type:: ['attachment' type only] the content-type of the attachment + * filename:: ['attachment' type only] the filename of the attachment + * size:: ['attachment' type only] the size of the attachment + */ +export const listAvatarOptions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/avatars', + ...options + }); +}; + +/** + * List calendar events for a user + * Retrieve the paginated list of calendar events or assignments for the specified user. + * To view calendar events for a user other than yourself, + * you must either be an observer of that user or an administrator. + */ +export const listCalendarEventsForUser = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/users/{user_id}/calendar_events', + ...options + }); +}; + +/** + * List user communication channels + * Returns a paginated list of communication channels for the specified user, + * sorted by position. + */ +export const listUserCommunicationChannels = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/communication_channels', + ...options + }); +}; + +/** + * Create a communication channel + * Creates a new communication channel for the specified user. + */ +export const createCommunicationChannel = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/communication_channels', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List of preference categories + * Fetch all notification preference categories for the given communication channel + */ +export const listOfPreferenceCategories = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/communication_channels/{communication_channel_id}/notification_preference_categories', + ...options + }); +}; + +/** + * List preferences + * Fetch all preferences for the given communication channel + */ +export const listPreferencesCommunicationChannelId = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/communication_channels/{communication_channel_id}/notification_preferences', + ...options + }); +}; + +/** + * Get a preference + * Fetch the preference for the given notification for the given communicaiton channel + */ +export const getPreferenceCommunicationChannelId = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/communication_channels/{communication_channel_id}/notification_preferences/{notification}', + ...options + }); +}; + +/** + * Delete a communication channel + * Delete an existing communication channel. + */ +export const deleteCommunicationChannelId = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/communication_channels/{id}', + ...options + }); +}; + +/** + * Delete a communication channel + * Delete an existing communication channel. + */ +export const deleteCommunicationChannelType = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/communication_channels/{type}/{address}', + ...options + }); +}; + +/** + * List preferences + * Fetch all preferences for the given communication channel + */ +export const listPreferencesType = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/communication_channels/{type}/{address}/notification_preferences', + ...options + }); +}; + +/** + * Get a preference + * Fetch the preference for the given notification for the given communicaiton channel + */ +export const getPreferenceType = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/communication_channels/{type}/{address}/notification_preferences/{notification}', + ...options + }); +}; + +/** + * List content exports + * A paginated list of the past and pending content export jobs for a course, + * group, or user. Exports are returned newest first. + */ +export const listContentExportsUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_exports', + ...options + }); +}; + +/** + * Export content + * Begin a content export job for a course, group, or user. + * + * You can use the {api:ProgressController#show Progress API} to track the + * progress of the export. The migration's progress is linked to with the + * _progress_url_ value. + * + * When the export completes, use the {api:ContentExportsApiController#show Show content export} endpoint + * to retrieve a download URL for the exported content. + */ +export const exportContentUsers = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_exports', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Show content export + * Get information about a single content export. + */ +export const showContentExportUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_exports/{id}', + ...options + }); +}; + +/** + * List licenses + * A paginated list of licenses that can be applied + */ +export const listLicensesUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_licenses', + ...options + }); +}; + +/** + * List content migrations + * Returns paginated content migrations + */ +export const listContentMigrationsUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_migrations', + ...options + }); +}; + +/** + * Create a content migration + * Create a content migration. If the migration requires a file to be uploaded + * the actual processing of the file will start once the file upload process is completed. + * File uploading works as described in the {file:file_uploads.html File Upload Documentation} + * except that the values are set on a *pre_attachment* sub-hash. + * + * For migrations that don't require a file to be uploaded, like course copy, the + * processing will begin as soon as the migration is created. + * + * You can use the {api:ProgressController#show Progress API} to track the + * progress of the migration. The migration's progress is linked to with the + * _progress_url_ value. + * + * The two general workflows are: + * + * If no file upload is needed: + * + * 1. POST to create + * 2. Use the {api:ProgressController#show Progress} specified in _progress_url_ to monitor progress + * + * For file uploading: + * + * 1. POST to create with file info in *pre_attachment* + * 2. Do {file:file_uploads.html file upload processing} using the data in the *pre_attachment* data + * 3. {api:ContentMigrationsController#show GET} the ContentMigration + * 4. Use the {api:ProgressController#show Progress} specified in _progress_url_ to monitor progress + * + * (required if doing .zip file upload) + */ +export const createContentMigrationUsers = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_migrations', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * List Migration Systems + * Lists the currently available migration types. These values may change. + */ +export const listMigrationSystemsUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_migrations/migrators', + ...options + }); +}; + +/** + * List migration issues + * Returns paginated migration issues + */ +export const listMigrationIssuesUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_migrations/{content_migration_id}/migration_issues', + ...options + }); +}; + +/** + * Get a migration issue + * Returns data on an individual migration issue + */ +export const getMigrationIssueUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_migrations/{content_migration_id}/migration_issues/{id}', + ...options + }); +}; + +/** + * Update a migration issue + * Update the workflow_state of a migration issue + */ +export const updateMigrationIssueUsers = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_migrations/{content_migration_id}/migration_issues/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Get a content migration + * Returns data on an individual content migration + */ +export const getContentMigrationUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_migrations/{id}', + ...options + }); +}; + +/** + * Update a content migration + * Update a content migration. Takes same arguments as create except that you + * can't change the migration type. However, changing most settings after the + * migration process has started will not do anything. Generally updating the + * content migration will be used when there is a file upload problem. If the + * first upload has a problem you can supply new _pre_attachment_ values to + * start the process again. + */ +export const updateContentMigrationUsers = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/content_migrations/{id}', + ...options + }); +}; + +/** + * List courses for a user + * Returns a paginated list of active courses for this user. To view the course list for a user other than yourself, you must be either an observer of that user or an administrator. + */ +export const listCoursesForUser = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/courses', + ...options + }); +}; + +/** + * List assignments for user + * Returns the paginated list of assignments for the specified user if the current user has rights to view. See {api:AssignmentsApiController#index List assignments} for valid arguments. + */ +export const listAssignmentsForUser = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/users/{user_id}/courses/{course_id}/assignments', + ...options + }); +}; + +/** + * Delete custom data + * Delete custom user data. + * + * Arbitrary JSON data can be stored for a User. This API call + * deletes that data for a given scope. Without a scope, all custom_data is deleted. + * See {api:UsersController#set_custom_data Store Custom Data} for details and + * examples of storage and retrieval. + * + * As an example, we'll store some data, then delete a subset of it. + * + * Example {api:UsersController#set_custom_data PUT} with valid JSON data: + * curl 'https:///api/v1/users//custom_data' \ + * -X PUT \ + * -F 'ns=com.my-organization.canvas-app' \ + * -F 'data[fruit][apple]=so tasty' \ + * -F 'data[fruit][kiwi]=a bit sour' \ + * -F 'data[veggies][root][onion]=tear-jerking' \ + * -H 'Authorization: Bearer ' + * + * Response: + * !!!javascript + * { + * "data": { + * "fruit": { + * "apple": "so tasty", + * "kiwi": "a bit sour" + * }, + * "veggies": { + * "root": { + * "onion": "tear-jerking" + * } + * } + * } + * } + * + * Example DELETE: + * curl 'https:///api/v1/users//custom_data/fruit/kiwi' \ + * -X DELETE \ + * -F 'ns=com.my-organization.canvas-app' \ + * -H 'Authorization: Bearer ' + * + * Response: + * !!!javascript + * { + * "data": "a bit sour" + * } + * + * Example {api:UsersController#get_custom_data GET} following the above DELETE: + * curl 'https:///api/v1/users//custom_data' \ + * -X GET \ + * -F 'ns=com.my-organization.canvas-app' \ + * -H 'Authorization: Bearer ' + * + * Response: + * !!!javascript + * { + * "data": { + * "fruit": { + * "apple": "so tasty" + * }, + * "veggies": { + * "root": { + * "onion": "tear-jerking" + * } + * } + * } + * } + * + * Note that hashes left empty after a DELETE will get removed from the custom_data store. + * For example, following the previous commands, if we delete /custom_data/veggies/root/onion, + * then the entire /custom_data/veggies scope will be removed. + * + * Example DELETE that empties a parent scope: + * curl 'https:///api/v1/users//custom_data/veggies/root/onion' \ + * -X DELETE \ + * -F 'ns=com.my-organization.canvas-app' \ + * -H 'Authorization: Bearer ' + * + * Response: + * !!!javascript + * { + * "data": "tear-jerking" + * } + * + * Example {api:UsersController#get_custom_data GET} following the above DELETE: + * curl 'https:///api/v1/users//custom_data' \ + * -X GET \ + * -F 'ns=com.my-organization.canvas-app' \ + * -H 'Authorization: Bearer ' + * + * Response: + * !!!javascript + * { + * "data": { + * "fruit": { + * "apple": "so tasty" + * } + * } + * } + * + * On success, this endpoint returns an object containing the data that was deleted. + * + * Responds with status code 400 if the namespace parameter, +ns+, is missing or invalid, + * or if the specified scope does not contain any data. + */ +export const deleteCustomData = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/custom_data', + ...options + }); +}; + +/** + * Load custom data + * Load custom user data. + * + * Arbitrary JSON data can be stored for a User. This API call + * retrieves that data for a (optional) given scope. + * See {api:UsersController#set_custom_data Store Custom Data} for details and + * examples. + * + * On success, this endpoint returns an object containing the data that was requested. + * + * Responds with status code 400 if the namespace parameter, +ns+, is missing or invalid, + * or if the specified scope does not contain any data. + */ +export const loadCustomData = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/custom_data', + ...options + }); +}; + +/** + * Store custom data + * Store arbitrary user data as JSON. + * + * Arbitrary JSON data can be stored for a User. + * A typical scenario would be an external site/service that registers users in Canvas + * and wants to capture additional info about them. The part of the URL that follows + * +/custom_data/+ defines the scope of the request, and it reflects the structure of + * the JSON data to be stored or retrieved. + * + * The value +self+ may be used for +user_id+ to store data associated with the calling user. + * In order to access another user's custom data, you must be an account administrator with + * permission to manage users. + * + * A namespace parameter, +ns+, is used to prevent custom_data collisions between + * different apps. This parameter is required for all custom_data requests. + * + * A request with Content-Type application/x-www-form-urlencoded or Content-Type + * application/x-www-form-urlencoded can only be used to store strings. + * + * Example PUT with application/x-www-form-urlencoded data: + * curl 'https:///api/v1/users//custom_data/telephone' \ + * -X PUT \ + * -F 'ns=com.my-organization.canvas-app' \ + * -F 'data=555-1234' \ + * -H 'Authorization: Bearer ' + * + * Response: + * !!!javascript + * { + * "data": "555-1234" + * } + * + * Subscopes (or, generated scopes) can also be specified by passing values to + * +data+[+subscope+]. + * + * Example PUT specifying subscopes: + * curl 'https:///api/v1/users//custom_data/body/measurements' \ + * -X PUT \ + * -F 'ns=com.my-organization.canvas-app' \ + * -F 'data[waist]=32in' \ + * -F 'data[inseam]=34in' \ + * -F 'data[chest]=40in' \ + * -H 'Authorization: Bearer ' + * + * Response: + * !!!javascript + * { + * "data": { + * "chest": "40in", + * "waist": "32in", + * "inseam": "34in" + * } + * } + * + * Following such a request, subsets of the stored data to be retrieved directly from a subscope. + * + * Example {api:UsersController#get_custom_data GET} from a generated scope + * curl 'https:///api/v1/users//custom_data/body/measurements/chest' \ + * -X GET \ + * -F 'ns=com.my-organization.canvas-app' \ + * -H 'Authorization: Bearer ' + * + * Response: + * !!!javascript + * { + * "data": "40in" + * } + * + * If you want to store more than just strings (i.e. numbers, arrays, hashes, true, false, + * and/or null), you must make a request with Content-Type application/json as in the following + * example. + * + * Example PUT with JSON data: + * curl 'https:///api/v1/users//custom_data' \ + * -H 'Content-Type: application/json' \ + * -X PUT \ + * -d '{ + * "ns": "com.my-organization.canvas-app", + * "data": { + * "a-number": 6.02e23, + * "a-bool": true, + * "a-string": "true", + * "a-hash": {"a": {"b": "ohai"}}, + * "an-array": [1, "two", null, false] + * } + * }' \ + * -H 'Authorization: Bearer ' + * + * Response: + * !!!javascript + * { + * "data": { + * "a-number": 6.02e+23, + * "a-bool": true, + * "a-string": "true", + * "a-hash": { + * "a": { + * "b": "ohai" + * } + * }, + * "an-array": [1, "two", null, false] + * } + * } + * + * If the data is an Object (as it is in the above example), then subsets of the data can + * be accessed by including the object's (possibly nested) keys in the scope of a GET request. + * + * Example {api:UsersController#get_custom_data GET} with a generated scope: + * curl 'https:///api/v1/users//custom_data/a-hash/a/b' \ + * -X GET \ + * -F 'ns=com.my-organization.canvas-app' \ + * -H 'Authorization: Bearer ' + * + * Response: + * !!!javascript + * { + * "data": "ohai" + * } + * + * + * On success, this endpoint returns an object containing the data that was stored. + * + * Responds with status code 200 if the scope already contained data, and it was overwritten + * by the data specified in the request. + * + * Responds with status code 201 if the scope was previously empty, and the data specified + * in the request was successfully stored there. + * + * Responds with status code 400 if the namespace parameter, +ns+, is missing or invalid, or if + * the +data+ parameter is missing. + * + * Responds with status code 409 if the requested scope caused a conflict and data was not stored. + * This happens when storing data at the requested scope would cause data at an outer scope + * to be lost. e.g., if +/custom_data+ was +{"fashion_app": {"hair": "blonde"}}+, but + * you tried to +`PUT /custom_data/fashion_app/hair/style -F data=buzz`+, then for the request + * to succeed,the value of +/custom_data/fashion_app/hair+ would have to become a hash, and its + * old string value would be lost. In this situation, an error object is returned with the + * following format: + * + * !!!javascript + * { + * "message": "write conflict for custom_data hash", + * "conflict_scope": "fashion_app/hair", + * "type_at_conflict": "String", + * "value_at_conflict": "blonde" + * } + */ +export const storeCustomData = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/custom_data', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List enrollments + * Depending on the URL given, return a paginated list of Either (1) all of the enrollments in a course, (2) all of the enrollments in a section or (3) all of a user's enrollments. This includes student, teacher, TA, and observer enrollments. If a user has multiple enrollments in a context (e.g. as a teacher and a student or in multiple course sections), each enrollment will be listed separately. note: Currently, only a root level admin user can return other users' enrollments. A user can, however, return his/her own enrollments. + */ +export const listEnrollmentsUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/users/{user_id}/enrollments', + ...options + }); +}; + +/** + * List features + * A paginated list of all features that apply to a given Account, Course, or User. + */ +export const listFeaturesUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/features', + ...options + }); +}; + +/** + * List enabled features + * A paginated list of all features that are enabled on a given Account, Course, or User. + * Only the feature names are returned. + */ +export const listEnabledFeaturesUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/features/enabled', + ...options + }); +}; + +/** + * Remove feature flag + * Remove feature flag for a given Account, Course, or User. (Note that the flag must + * be defined on the Account, Course, or User directly.) The object will then inherit + * the feature flags from a higher account, if any exist. If this flag was 'on' or 'off', + * then lower-level account flags that were masked by this one will apply again. + */ +export const removeFeatureFlagUsers = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/features/flags/{feature}', + ...options + }); +}; + +/** + * Get feature flag + * Get the feature flag that applies to a given Account, Course, or User. + * The flag may be defined on the object, or it may be inherited from a parent + * account. You can look at the context_id and context_type of the returned object + * to determine which is the case. If these fields are missing, then the object + * is the global Canvas default. + */ +export const getFeatureFlagUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/features/flags/{feature}', + ...options + }); +}; + +/** + * Set feature flag + * Set a feature flag for a given Account, Course, or User. This call will fail if a parent account sets + * a feature flag for the same feature in any state other than "allowed". + */ +export const setFeatureFlagUsers = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/features/flags/{feature}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Upload a file + * Upload a file to the user's personal files section. This API endpoint is the first step in uploading a file to a user's files. See the {file:file_uploads.html File Upload Documentation} for details on the file upload workflow. Note that typically users will only be able to upload files to their own files section. Passing a user_id of +self+ is an easy shortcut to specify the current user. + */ +export const uploadFileToUsersFiles = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/files', + ...options + }); +}; + +/** + * Get quota information + * Returns the total and used storage quota for the course, group, or user. + */ +export const getQuotaInformationUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/files/quota', + ...options + }); +}; + +/** + * Get file + * Returns the standard attachment json object + */ +export const getFileUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/files/{id}', + ...options + }); +}; + +/** + * List all folders + * Returns the paginated list of all folders for the given context. This will + * be returned as a flat list containing all subfolders as well. + */ +export const listAllFoldersUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/folders', + ...options + }); +}; + +/** + * Create folder + * Creates a folder in the specified context + */ +export const createFolderUsers = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/folders', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +/** + * Resolve path + * Given the full path to a folder, returns a list of all Folders in the path hierarchy, + * starting at the root folder, and ending at the requested folder. The given path is + * relative to the context's root folder and does not include the root folder's name + * (e.g., "course files"). If an empty path is given, the context's root folder alone + * is returned. Otherwise, if no folder exists with the given full path, a Not Found + * error is returned. + */ +export const resolvePathUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/folders/by_path', + ...options + }); +}; + +/** + * Resolve path + * Given the full path to a folder, returns a list of all Folders in the path hierarchy, + * starting at the root folder, and ending at the requested folder. The given path is + * relative to the context's root folder and does not include the root folder's name + * (e.g., "course files"). If an empty path is given, the context's root folder alone + * is returned. Otherwise, if no folder exists with the given full path, a Not Found + * error is returned. + */ +export const resolvePathUsersFullPath = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/folders/by_path/*full_path', + ...options + }); +}; + +/** + * Get folder + * Returns the details for a folder + * + * You can get the root folder from a context by using 'root' as the :id. + * For example, you could get the root folder for a course like: + */ +export const getFolderUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/folders/{id}', + ...options + }); +}; + +/** + * List user logins + * Given a user ID, return a paginated list of that user's logins for the given account. + */ +export const listUserLoginsUsers = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/logins', + ...options + }); +}; + +/** + * Delete a user login + * Delete an existing login. + */ +export const deleteUserLogin = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/logins/{id}', + ...options + }); +}; + +/** + * List Missing Submissions + * A paginated list of past-due assignments for which the student does not have a submission. + * The user sending the request must either be the student, an admin or a parent observer using the parent app + */ +export const listMissingSubmissions = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/missing_submissions', + ...options + }); +}; + +/** + * List observees + * A paginated list of the users that the given user is observing. + * + * *Note:* all users are allowed to list their own observees. Administrators can list + * other users' observees. + * + * The returned observees will include an attribute "observation_link_root_account_ids", a list + * of ids for the root accounts the observer and observee are linked on. The observer will only be able to + * observe in courses associated with these root accounts. + */ +export const listObservees = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/observees', + ...options + }); +}; + +/** + * Add an observee with credentials + * Register the given user to observe another user, given the observee's credentials. + * + * *Note:* all users are allowed to add their own observees, given the observee's + * credentials or access token are provided. Administrators can add observees given credentials, access token or + * the {api:UserObserveesController#update observee's id}. + */ +export const addObserveeWithCredentials = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/observees', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * Remove an observee + * Unregisters a user as being observed by the given user. + */ +export const removeObservee = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/observees/{observee_id}', + ...options + }); +}; + +/** + * Show an observee + * Gets information about an observed user. + * + * *Note:* all users are allowed to view their own observees. + */ +export const showObservee = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/observees/{observee_id}', + ...options + }); +}; + +/** + * Add an observee + * Registers a user as being observed by the given user. + */ +export const addObservee = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/observees/{observee_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +/** + * List user page views + * Return a paginated list of the user's page view history in json format, + * similar to the available CSV download. Page views are returned in + * descending order, newest to oldest. + */ +export const listUserPageViews = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/page_views', + ...options + }); +}; + +/** + * Get user profile + * Returns user profile data, including user id, name, and profile pic. + * + * When requesting the profile for the user accessing the API, the user's + * calendar feed URL and LTI user id will be returned as well. + */ +export const getUserProfile = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/profile', + ...options + }); +}; + +/** + * Remove usage rights + * Removes copyright and license information associated with one or more files + */ +export const removeUsageRightsUsers = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/v1/users/{user_id}/usage_rights', + ...options + }); +}; + +/** + * Set usage rights + * Sets copyright and license information for one or more files + */ +export const setUsageRightsUsers = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/v1/users/{user_id}/usage_rights', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; \ No newline at end of file diff --git a/packages/canvas-api-client/src/generated/types.gen.ts b/packages/canvas-api-client/src/generated/types.gen.ts new file mode 100644 index 00000000..b5ddfa96 --- /dev/null +++ b/packages/canvas-api-client/src/generated/types.gen.ts @@ -0,0 +1,33528 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type Account = { + /** + * The storage quota for a group in the account in megabytes, if not otherwise specified + */ + default_group_storage_quota_mb?: number | null; + /** + * The storage quota for the account in megabytes, if not otherwise specified + */ + default_storage_quota_mb?: number | null; + /** + * The default time zone of the account. Allowed time zones are {http://www.iana.org/time-zones IANA time zones} or friendlier {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. + */ + default_time_zone?: string | null; + /** + * The storage quota for a user in the account in megabytes, if not otherwise specified + */ + default_user_storage_quota_mb?: number | null; + /** + * the ID of the Account object + */ + id?: number | null; + /** + * The account's identifier in the Student Information System. Only included if the user has permission to view SIS information. + */ + integration_id?: string | null; + /** + * The account's identifier that is sent as context_id in LTI launches. + */ + lti_guid?: string | null; + /** + * The display name of the account + */ + name?: string | null; + /** + * The account's parent ID, or null if this is the root account + */ + parent_account_id?: number | null; + /** + * The ID of the root account, or null if this is the root account + */ + root_account_id?: number | null; + /** + * The account's identifier in the Student Information System. Only included if the user has permission to view SIS information. + */ + sis_account_id?: string | null; + /** + * The id of the SIS import if created through SIS. Only included if the user has permission to manage SIS information. + */ + sis_import_id?: number | null; + /** + * The UUID of the account + */ + uuid?: string | null; + /** + * The state of the account. Can be 'active' or 'deleted'. + */ + workflow_state?: string | null; +}; + +export type AccountNotification = { + /** + * When to expire the notification. + */ + end_at?: string | null; + /** + * The icon to display with the message. Defaults to warning. + */ + icon?: string | null; + /** + * The message to be sent in the notification. + */ + message?: string | null; + /** + * The roles to send the notification to. If roles is not passed it defaults to all roles + */ + role_ids?: Array | null; + /** + * (Deprecated) The roles to send the notification to. If roles is not passed it defaults to all roles + */ + roles?: Array | null; + /** + * When to send out the notification. + */ + start_at?: string | null; + /** + * The subject of the notifications + */ + subject?: string | null; +}; + +export type ActivityStream = { + created_at?: string; + updated_at?: string; + id?: number; + title?: string; + /** + * The body text of the activity stream item. + */ + message?: string; + type?: string; + read_state?: boolean; + context_type?: string; + course_id?: number; + group_id?: number; + /** + * the URL to the Canvas web UI for this stream item + */ + html_url?: string; +}; + +export type Admin = { + /** + * The unique identifier for the account role/user assignment. + */ + id: number; + /** + * The account role assigned. This can be 'AccountAdmin' or a user-defined role created by the Roles API. + */ + role?: string | null; + user?: User; + /** + * The status of the account role/user assignment. + */ + workflow_state?: string | null; +}; + +export type Answer = { + /** + * Specific contextual comments for a particular answer. + */ + answer_comments?: string | null; + /** + * Used in matching questions. The static value of the answer that will be displayed on the left for students to match for. + */ + answer_match_left?: string | null; + /** + * Used in matching questions. The correct match for the value given in answer_match_left. Will be displayed in a dropdown with the other answer_match_right values.. + */ + answer_match_right?: string | null; + /** + * The text of the answer. + */ + answer_text: string; + /** + * An integer to determine correctness of the answer. Incorrect answers should be 0, correct answers should be non-negative. + */ + answer_weight: number; + /** + * Used in numerical questions of type 'precision_answer'. The value the answer should equal. + */ + approximate?: number | null; + /** + * Used in fill in multiple blank and multiple dropdowns questions. + */ + blank_id?: number | null; + /** + * Used in numerical questions of type 'range_answer'. The end of the allowed range (inclusive). + */ + end?: number | null; + /** + * Used in numerical questions of type 'exact_answer'. The value the answer should equal. + */ + exact?: number | null; + /** + * The unique identifier for the answer. Do not supply if this answer is part of a new question + */ + id?: number | null; + /** + * Used in numerical questions of type 'exact_answer'. The margin of error allowed for the student's answer. + */ + margin?: number | null; + /** + * Used in matching questions. A list of distractors, delimited by new lines ( + * ) that will be seeded with all the answer_match_right values. + */ + matching_answer_incorrect_matches?: string | null; + /** + * Used in numerical questions. Values can be 'exact_answer', 'range_answer', or 'precision_answer'. + */ + numerical_answer_type?: string | null; + /** + * Used in numerical questions of type 'precision_answer'. The numerical precision that will be used when comparing the student's answer. + */ + precision?: number | null; + /** + * Used in numerical questions of type 'range_answer'. The start of the allowed range (inclusive). + */ + start?: number | null; + /** + * Used in missing word questions. The text to follow the missing word + */ + text_after_answers?: string | null; +}; + +export type Assignment = { + /** + * (Optional) all dates associated with the assignment, if applicable + */ + all_dates?: Array | null; + /** + * Allowed file extensions, which take effect if submission_types includes 'online_upload'. + */ + allowed_extensions?: Array | null; + /** + * (Optional) whether anonymous submissions are accepted (applies only to quiz assignments) + */ + anonymous_submissions?: boolean | null; + /** + * the ID of the assignment's group + */ + assignment_group_id?: number | null; + /** + * (Optional) If 'assignment_visibility' is included in the 'include' parameter, includes an array of student IDs who can see this assignment. + */ + assignment_visibility?: Array | null; + /** + * Boolean indicating peer reviews are assigned automatically. If false, the teacher is expected to manually assign peer reviews. + */ + automatic_peer_reviews?: boolean | null; + /** + * the ID of the course the assignment belongs to + */ + course_id?: number | null; + /** + * The time at which this assignment was originally created + */ + created_at?: string | null; + /** + * the assignment description, in an HTML fragment + */ + description?: string | null; + discussion_topic?: DiscussionTopicNullable; + /** + * the due date for the assignment. returns null if not present. NOTE: If this assignment has assignment overrides, this field will be the due date as it applies to the user requesting information from the API. + */ + due_at?: string | null; + /** + * Boolean flag indicating whether the assignment requires a due date based on the account level setting + */ + due_date_required?: boolean | null; + external_tool_tag_attributes?: ExternalToolTagAttributes; + /** + * (Optional) Boolean indicating if assignment will be frozen when it is copied. NOTE: This field will only be present if the AssignmentFreezer plugin is available for your account. + */ + freeze_on_copy?: boolean | null; + /** + * (Optional) Boolean indicating if assignment is frozen for the calling user. NOTE: This field will only be present if the AssignmentFreezer plugin is available for your account. + */ + frozen?: boolean | null; + /** + * (Optional) Array of frozen attributes for the assignment. Only account administrators currently have permission to change an attribute in this list. Will be empty if no attributes are frozen for this assignment. Possible frozen attributes are: title, description, lock_at, points_possible, grading_type, submission_types, assignment_group_id, allowed_extensions, group_category_id, notify_of_update, peer_reviews NOTE: This field will only be present if the AssignmentFreezer plugin is available for your account. + */ + frozen_attributes?: Array | null; + /** + * If this is a group assignment, boolean flag indicating whether or not students will be graded individually. + */ + grade_group_students_individually?: boolean | null; + /** + * The id of the grading standard being applied to this assignment. Valid if grading_type is 'letter_grade' or 'gpa_scale'. + */ + grading_standard_id?: number | null; + /** + * The type of grading the assignment receives; one of 'pass_fail', 'percent', 'letter_grade', 'gpa_scale', 'points' + */ + grading_type?: string | null; + /** + * The ID of the assignments group set, if this is a group assignment. For group discussions, set group_category_id on the discussion topic, not the linked assignment. + */ + group_category_id?: number | null; + /** + * whether this assignment has overrides + */ + has_overrides?: boolean | null; + /** + * If true, the assignment has been submitted to by at least one student + */ + has_submitted_submissions?: boolean | null; + /** + * the URL to the assignment's web page + */ + html_url?: string | null; + /** + * the ID of the assignment + */ + id?: number | null; + /** + * (optional, Third Party integration data for assignment) + */ + integration_data?: { + [key: string]: string; + } | null; + /** + * (optional, Third Party unique identifier for Assignment) + */ + integration_id?: string | null; + /** + * Boolean representing whether or not members from within the same group on a group assignment can be assigned to peer review their own group's work + */ + intra_group_peer_reviews?: boolean | null; + /** + * the lock date (assignment is locked after this date). returns null if not present. NOTE: If this assignment has assignment overrides, this field will be the lock date as it applies to the user requesting information from the API. + */ + lock_at?: string | null; + /** + * (Optional) An explanation of why this is locked for the user. Present when locked_for_user is true. + */ + lock_explanation?: string | null; + lock_info?: LockInfo; + /** + * Whether or not this is locked for the user. + */ + locked_for_user?: boolean | null; + /** + * An integer indicating the maximum length an assignment's name may be + */ + max_name_length?: number | null; + /** + * Boolean indicating if the assignment is moderated. + */ + moderated_grading?: boolean | null; + /** + * whether the assignment is muted + */ + muted?: boolean | null; + /** + * the name of the assignment + */ + name?: string | null; + /** + * if the requesting user has grading rights, the number of submissions that need grading. + */ + needs_grading_count?: number | null; + /** + * if the requesting user has grading rights and the 'needs_grading_count_by_section' flag is specified, the number of submissions that need grading split out by section. NOTE: This key is NOT present unless you pass the 'needs_grading_count_by_section' argument as true. ANOTHER NOTE: it's possible to be enrolled in multiple sections, and if a student is setup that way they will show an assignment that needs grading in multiple sections (effectively the count will be duplicated between sections) + */ + needs_grading_count_by_section?: Array | null; + /** + * (Optional) If true, the assignment will be omitted from the student's final grade + */ + omit_from_final_grade?: boolean | null; + /** + * Whether the assignment is only visible to overrides. + */ + only_visible_to_overrides?: boolean | null; + /** + * (Optional) If 'overrides' is included in the 'include' parameter, includes an array of assignment override objects. + */ + overrides?: Array | null; + /** + * Integer representing the amount of reviews each user is assigned. NOTE: This key is NOT present unless you have automatic_peer_reviews set to true. + */ + peer_review_count?: number | null; + /** + * Boolean indicating if peer reviews are required for this assignment + */ + peer_reviews?: boolean | null; + /** + * String representing a date the reviews are due by. Must be a date that occurs after the default due date. If blank, or date is not after the assignment's due date, the assignment's due date will be used. NOTE: This key is NOT present unless you have automatic_peer_reviews set to true. + */ + peer_reviews_assign_at?: string | null; + /** + * the maximum points possible for the assignment + */ + points_possible?: number | null; + /** + * the sorting order of the assignment in the group + */ + position?: number | null; + /** + * (optional, present if Sync Grades to SIS feature is enabled) + */ + post_to_sis?: boolean | null; + /** + * Whether the assignment is published + */ + published?: boolean | null; + /** + * (Optional) id of the associated quiz (applies only when submission_types is ['online_quiz']) + */ + quiz_id?: number | null; + /** + * (Optional) A list of scoring criteria and ratings for each rubric criterion. Included if there is an associated rubric. + */ + rubric?: Array | null; + rubric_settings?: RubricSettings; + submission?: SubmissionNullable; + /** + * the types of submissions allowed for this assignment list containing one or more of the following: 'discussion_topic', 'online_quiz', 'on_paper', 'none', 'external_tool', 'online_text_entry', 'online_url', 'online_upload' 'media_recording' + */ + submission_types?: Array | null; + /** + * the URL to download all submissions as a zip + */ + submissions_download_url?: string | null; + /** + * Boolean flag indicating whether or not Turnitin has been enabled for the assignment. NOTE: This flag will not appear unless your account has the Turnitin plugin available + */ + turnitin_enabled?: boolean | null; + turnitin_settings?: TurnitinSettings; + /** + * the unlock date (assignment is unlocked after this date) returns null if not present NOTE: If this assignment has assignment overrides, this field will be the unlock date as it applies to the user requesting information from the API. + */ + unlock_at?: string | null; + /** + * Whether the assignment's 'published' state can be changed to false. Will be false if there are student submissions for the assignment. + */ + unpublishable?: boolean | null; + /** + * The time at which this assignment was last modified in any way + */ + updated_at?: string | null; + /** + * (Optional) If true, the rubric is directly tied to grading the assignment. Otherwise, it is only advisory. Included if there is an associated rubric. + */ + use_rubric_for_grading?: boolean | null; + /** + * Boolean flag indicating whether or not VeriCite has been enabled for the assignment. NOTE: This flag will not appear unless your account has the VeriCite plugin available + */ + vericite_enabled?: boolean | null; +}; + +/** + * The submission's assignment (see the assignments API) (optional) + */ +export type AssignmentNullable = { + /** + * (Optional) all dates associated with the assignment, if applicable + */ + all_dates?: Array | null; + /** + * Allowed file extensions, which take effect if submission_types includes 'online_upload'. + */ + allowed_extensions?: Array | null; + /** + * (Optional) whether anonymous submissions are accepted (applies only to quiz assignments) + */ + anonymous_submissions?: boolean | null; + /** + * the ID of the assignment's group + */ + assignment_group_id?: number | null; + /** + * (Optional) If 'assignment_visibility' is included in the 'include' parameter, includes an array of student IDs who can see this assignment. + */ + assignment_visibility?: Array | null; + /** + * Boolean indicating peer reviews are assigned automatically. If false, the teacher is expected to manually assign peer reviews. + */ + automatic_peer_reviews?: boolean | null; + /** + * the ID of the course the assignment belongs to + */ + course_id?: number | null; + /** + * The time at which this assignment was originally created + */ + created_at?: string | null; + /** + * the assignment description, in an HTML fragment + */ + description?: string | null; + discussion_topic?: DiscussionTopicNullable; + /** + * the due date for the assignment. returns null if not present. NOTE: If this assignment has assignment overrides, this field will be the due date as it applies to the user requesting information from the API. + */ + due_at?: string | null; + /** + * Boolean flag indicating whether the assignment requires a due date based on the account level setting + */ + due_date_required?: boolean | null; + external_tool_tag_attributes?: ExternalToolTagAttributes; + /** + * (Optional) Boolean indicating if assignment will be frozen when it is copied. NOTE: This field will only be present if the AssignmentFreezer plugin is available for your account. + */ + freeze_on_copy?: boolean | null; + /** + * (Optional) Boolean indicating if assignment is frozen for the calling user. NOTE: This field will only be present if the AssignmentFreezer plugin is available for your account. + */ + frozen?: boolean | null; + /** + * (Optional) Array of frozen attributes for the assignment. Only account administrators currently have permission to change an attribute in this list. Will be empty if no attributes are frozen for this assignment. Possible frozen attributes are: title, description, lock_at, points_possible, grading_type, submission_types, assignment_group_id, allowed_extensions, group_category_id, notify_of_update, peer_reviews NOTE: This field will only be present if the AssignmentFreezer plugin is available for your account. + */ + frozen_attributes?: Array | null; + /** + * If this is a group assignment, boolean flag indicating whether or not students will be graded individually. + */ + grade_group_students_individually?: boolean | null; + /** + * The id of the grading standard being applied to this assignment. Valid if grading_type is 'letter_grade' or 'gpa_scale'. + */ + grading_standard_id?: number | null; + /** + * The type of grading the assignment receives; one of 'pass_fail', 'percent', 'letter_grade', 'gpa_scale', 'points' + */ + grading_type?: string | null; + /** + * The ID of the assignments group set, if this is a group assignment. For group discussions, set group_category_id on the discussion topic, not the linked assignment. + */ + group_category_id?: number | null; + /** + * whether this assignment has overrides + */ + has_overrides?: boolean | null; + /** + * If true, the assignment has been submitted to by at least one student + */ + has_submitted_submissions?: boolean | null; + /** + * the URL to the assignment's web page + */ + html_url?: string | null; + /** + * the ID of the assignment + */ + id?: number | null; + /** + * (optional, Third Party integration data for assignment) + */ + integration_data?: { + [key: string]: string; + } | null; + /** + * (optional, Third Party unique identifier for Assignment) + */ + integration_id?: string | null; + /** + * Boolean representing whether or not members from within the same group on a group assignment can be assigned to peer review their own group's work + */ + intra_group_peer_reviews?: boolean | null; + /** + * the lock date (assignment is locked after this date). returns null if not present. NOTE: If this assignment has assignment overrides, this field will be the lock date as it applies to the user requesting information from the API. + */ + lock_at?: string | null; + /** + * (Optional) An explanation of why this is locked for the user. Present when locked_for_user is true. + */ + lock_explanation?: string | null; + lock_info?: LockInfo; + /** + * Whether or not this is locked for the user. + */ + locked_for_user?: boolean | null; + /** + * An integer indicating the maximum length an assignment's name may be + */ + max_name_length?: number | null; + /** + * Boolean indicating if the assignment is moderated. + */ + moderated_grading?: boolean | null; + /** + * whether the assignment is muted + */ + muted?: boolean | null; + /** + * the name of the assignment + */ + name?: string | null; + /** + * if the requesting user has grading rights, the number of submissions that need grading. + */ + needs_grading_count?: number | null; + /** + * if the requesting user has grading rights and the 'needs_grading_count_by_section' flag is specified, the number of submissions that need grading split out by section. NOTE: This key is NOT present unless you pass the 'needs_grading_count_by_section' argument as true. ANOTHER NOTE: it's possible to be enrolled in multiple sections, and if a student is setup that way they will show an assignment that needs grading in multiple sections (effectively the count will be duplicated between sections) + */ + needs_grading_count_by_section?: Array | null; + /** + * (Optional) If true, the assignment will be omitted from the student's final grade + */ + omit_from_final_grade?: boolean | null; + /** + * Whether the assignment is only visible to overrides. + */ + only_visible_to_overrides?: boolean | null; + /** + * (Optional) If 'overrides' is included in the 'include' parameter, includes an array of assignment override objects. + */ + overrides?: Array | null; + /** + * Integer representing the amount of reviews each user is assigned. NOTE: This key is NOT present unless you have automatic_peer_reviews set to true. + */ + peer_review_count?: number | null; + /** + * Boolean indicating if peer reviews are required for this assignment + */ + peer_reviews?: boolean | null; + /** + * String representing a date the reviews are due by. Must be a date that occurs after the default due date. If blank, or date is not after the assignment's due date, the assignment's due date will be used. NOTE: This key is NOT present unless you have automatic_peer_reviews set to true. + */ + peer_reviews_assign_at?: string | null; + /** + * the maximum points possible for the assignment + */ + points_possible?: number | null; + /** + * the sorting order of the assignment in the group + */ + position?: number | null; + /** + * (optional, present if Sync Grades to SIS feature is enabled) + */ + post_to_sis?: boolean | null; + /** + * Whether the assignment is published + */ + published?: boolean | null; + /** + * (Optional) id of the associated quiz (applies only when submission_types is ['online_quiz']) + */ + quiz_id?: number | null; + /** + * (Optional) A list of scoring criteria and ratings for each rubric criterion. Included if there is an associated rubric. + */ + rubric?: Array | null; + rubric_settings?: RubricSettings; + submission?: SubmissionNullable; + /** + * the types of submissions allowed for this assignment list containing one or more of the following: 'discussion_topic', 'online_quiz', 'on_paper', 'none', 'external_tool', 'online_text_entry', 'online_url', 'online_upload' 'media_recording' + */ + submission_types?: Array | null; + /** + * the URL to download all submissions as a zip + */ + submissions_download_url?: string | null; + /** + * Boolean flag indicating whether or not Turnitin has been enabled for the assignment. NOTE: This flag will not appear unless your account has the Turnitin plugin available + */ + turnitin_enabled?: boolean | null; + turnitin_settings?: TurnitinSettings; + /** + * the unlock date (assignment is unlocked after this date) returns null if not present NOTE: If this assignment has assignment overrides, this field will be the unlock date as it applies to the user requesting information from the API. + */ + unlock_at?: string | null; + /** + * Whether the assignment's 'published' state can be changed to false. Will be false if there are student submissions for the assignment. + */ + unpublishable?: boolean | null; + /** + * The time at which this assignment was last modified in any way + */ + updated_at?: string | null; + /** + * (Optional) If true, the rubric is directly tied to grading the assignment. Otherwise, it is only advisory. Included if there is an associated rubric. + */ + use_rubric_for_grading?: boolean | null; + /** + * Boolean flag indicating whether or not VeriCite has been enabled for the assignment. NOTE: This flag will not appear unless your account has the VeriCite plugin available + */ + vericite_enabled?: boolean | null; +} | null; + +/** + * Object representing a due date for an assignment or quiz. If the due date came from an assignment override, it will have an 'id' field. + */ +export type AssignmentDate = { + /** + * (Optional, present if 'id' is missing) whether this date represents the assignment's or quiz's default due date + */ + base?: boolean | null; + /** + * The due date for the assignment. Must be between the unlock date and the lock date if there are lock dates + */ + due_at?: string | null; + /** + * (Optional, missing if 'base' is present) id of the assignment override this date represents + */ + id?: number | null; + /** + * The lock date for the assignment. Must be after the due date if there is a due date. + */ + lock_at?: string | null; + title?: string | null; + /** + * The unlock date for the assignment. Must be before the due date if there is a due date. + */ + unlock_at?: string | null; +}; + +export type AssignmentGroup = { + /** + * the assignments in this Assignment Group (see the Assignment API for a detailed list of fields) + */ + assignments?: Array | null; + /** + * the weight of the Assignment Group + */ + group_weight?: number | null; + /** + * the id of the Assignment Group + */ + id?: number | null; + /** + * the integration data of the Assignment Group + */ + integration_data?: { + [key: string]: unknown; + } | null; + /** + * the name of the Assignment Group + */ + name?: string | null; + /** + * the position of the Assignment Group + */ + position?: number | null; + rules?: GradingRules; + /** + * the sis source id of the Assignment Group + */ + sis_source_id?: string | null; +}; + +export type AssignmentOverride = { + /** + * the overridden all day flag (present if due_at is overridden) + */ + all_day?: number | null; + /** + * the overridden all day date (present if due_at is overridden) + */ + all_day_date?: string | null; + /** + * the ID of the assignment the override applies to + */ + assignment_id?: number | null; + /** + * the ID of the overrides's target section (present if the override targets a section) + */ + course_section_id?: number | null; + /** + * the overridden due at (present if due_at is overridden) + */ + due_at?: string | null; + /** + * the ID of the override's target group (present if the override targets a group and the assignment is a group assignment) + */ + group_id?: number | null; + /** + * the ID of the assignment override + */ + id?: number | null; + /** + * the overridden lock at, if any (present if lock_at is overridden) + */ + lock_at?: string | null; + /** + * the IDs of the override's target students (present if the override targets an ad-hoc set of students) + */ + student_ids?: Array | null; + /** + * the title of the override + */ + title?: string | null; + /** + * the overridden unlock at (present if unlock_at is overridden) + */ + unlock_at?: string | null; +}; + +export type AuthenticationProvider = { + /** + * Valid for LDAP and CAS providers. + */ + auth_base?: string | null; + /** + * Valid for LDAP providers. + */ + auth_filter?: string | null; + /** + * Valid for LDAP providers. + */ + auth_host?: string | null; + /** + * Valid for LDAP providers. + */ + auth_over_tls?: number | null; + /** + * Valid for LDAP providers. + */ + auth_port?: number | null; + /** + * Valid for all providers. + */ + auth_type?: string | null; + /** + * Valid for LDAP providers. + */ + auth_username?: string | null; + /** + * Valid for SAML providers. + */ + certificate_fingerprint?: string | null; + federated_attributes?: FederatedAttributesConfig; + /** + * Valid for all providers. + */ + id?: number | null; + /** + * Valid for SAML providers. + */ + identifier_format?: string | null; + /** + * Valid for SAML providers. + */ + idp_entity_id?: string | null; + /** + * Just In Time provisioning. Valid for all providers except Canvas (which has the similar in concept self_registration setting). + */ + jit_provisioning?: boolean | null; + /** + * Valid for SAML and CAS providers. + */ + log_in_url?: string | null; + /** + * Valid for SAML providers. + */ + log_out_url?: string | null; + /** + * Valid for SAML providers. + */ + login_attribute?: string | null; + /** + * Valid for all providers. + */ + position?: number | null; + /** + * Valid for SAML providers. + */ + requested_authn_context?: string | null; + /** + * Valid for SAML providers. + */ + sig_alg?: string | null; +}; + +/** + * Possible avatar for a user. + */ +export type Avatar = { + /** + * ['attachment' type only] the content-type of the attachment. + */ + 'content-type'?: string | null; + /** + * A textual description of the avatar record. + */ + display_name: string; + /** + * ['attachment' type only] the filename of the attachment + */ + filename?: string | null; + /** + * ['attachment' type only] the internal id of the attachment + */ + id?: number | null; + /** + * ['attachment' type only] the size of the attachment + */ + size?: number | null; + /** + * A unique representation of the avatar record which can be used to set the avatar with the user update endpoint. Note: this is an internal representation and is subject to change without notice. It should be consumed with this api endpoint and used in the user update endpoint, and should not be constructed by the client. + */ + token: string; + /** + * ['gravatar'|'attachment'|'no_pic'] The type of avatar record, for categorization purposes. + */ + type: string; + /** + * The url of the avatar + */ + url: string; +}; + +export type BlueprintMigration = { + /** + * User-specified comment describing changes made in this operation + */ + comment?: string | null; + /** + * Time when the migration was queued + */ + created_at?: string | null; + /** + * Time when the exports begun + */ + exports_started_at?: string | null; + /** + * The ID of the migration. + */ + id?: number | null; + /** + * Time when the imports were completed + */ + imports_completed_at?: string | null; + /** + * Time when the exports were completed and imports were queued + */ + imports_queued_at?: string | null; + /** + * The ID of the associated course's blueprint subscription. Only present when querying a course associated with a blueprint. + */ + subscription_id?: number | null; + /** + * The ID of the template the migration belongs to. Only present when querying a blueprint course. + */ + template_id?: number | null; + /** + * The ID of the user who queued the migration. + */ + user_id?: number | null; + /** + * Current state of the content migration: queued, exporting, imports_queued, completed, exports_failed, imports_failed + */ + workflow_state?: string | null; +}; + +export type BlueprintMigrationNullable = { + /** + * User-specified comment describing changes made in this operation + */ + comment?: string | null; + /** + * Time when the migration was queued + */ + created_at?: string | null; + /** + * Time when the exports begun + */ + exports_started_at?: string | null; + /** + * The ID of the migration. + */ + id?: number | null; + /** + * Time when the imports were completed + */ + imports_completed_at?: string | null; + /** + * Time when the exports were completed and imports were queued + */ + imports_queued_at?: string | null; + /** + * The ID of the associated course's blueprint subscription. Only present when querying a course associated with a blueprint. + */ + subscription_id?: number | null; + /** + * The ID of the template the migration belongs to. Only present when querying a blueprint course. + */ + template_id?: number | null; + /** + * The ID of the user who queued the migration. + */ + user_id?: number | null; + /** + * Current state of the content migration: queued, exporting, imports_queued, completed, exports_failed, imports_failed + */ + workflow_state?: string | null; +} | null; + +/** + * Associates a course with a blueprint + */ +export type BlueprintSubscription = { + /** + * The blueprint course subscribed to + */ + blueprint_course?: { + [key: string]: unknown; + } | null; + /** + * The ID of the blueprint course subscription + */ + id?: number | null; + /** + * The ID of the blueprint template the associated course is subscribed to + */ + template_id?: number | null; +}; + +export type BlueprintTemplate = { + /** + * Number of associated courses for the template + */ + associated_course_count?: number | null; + /** + * The ID of the Course the template belongs to. + */ + course_id?: number | null; + /** + * The ID of the template. + */ + id?: number | null; + /** + * Time when the last export was completed + */ + last_export_completed_at?: string | null; + latest_migration?: BlueprintMigrationNullable; +}; + +export type Bookmark = { + data?: { + [key: string]: unknown; + } | null; + id?: number | null; + name?: string | null; + position?: number | null; + url?: string; +}; + +export type CalendarEvent = { + /** + * a comma-separated list of all calendar contexts this event is part of + */ + all_context_codes?: string | null; + /** + * Boolean indicating whether this is an all-day event (midnight to midnight) + */ + all_day?: boolean | null; + /** + * The date of this event + */ + all_day_date?: string | null; + /** + * Various Appointment-Group-related fields.These fields are only pertinent to time slots (appointments) and reservations of those time slots. See the Appointment Groups API. The id of the appointment group + */ + appointment_group_id?: number | null; + /** + * The API URL of the appointment group + */ + appointment_group_url?: string | null; + /** + * If the event is a time slot and it has a participant limit, an integer indicating how many slots are available + */ + available_slots?: number | null; + /** + * Included by default, but may be excluded (see include[] option). If this is a time slot (see the Appointment Groups API) this will be a list of any reservations. If this is a course-level event, this will be a list of section-level events (if any) + */ + child_events?: Array | null; + /** + * The number of child_events. See child_events (and parent_event_id) + */ + child_events_count?: number | null; + /** + * the context code of the calendar this event belongs to (course, user or group) + */ + context_code?: string | null; + /** + * When the calendar event was created + */ + created_at?: string | null; + /** + * The HTML description of the event + */ + description?: string | null; + /** + * if specified, it indicates which calendar this event should be displayed on. for example, a section-level event would have the course's context code here, while the section's context code would be returned above) + */ + effective_context_code?: string | null; + /** + * The end timestamp of the event + */ + end_at?: string | null; + /** + * If the event is a group-level reservation, this will contain the group participant JSON (refer to the Groups API). + */ + group?: string | null; + /** + * Whether this event should be displayed on the calendar. Only true for course-level events with section-level child events. + */ + hidden?: boolean | null; + /** + * URL for a user to view this event + */ + html_url?: string | null; + /** + * The ID of the calendar event + */ + id?: number | null; + /** + * The address where the event is taking place + */ + location_address?: string | null; + /** + * The location name of the event + */ + location_name?: string | null; + /** + * If the event is a reservation, this a boolean indicating whether it is the current user's reservation, or someone else's + */ + own_reservation?: boolean | null; + /** + * Normally null. If this is a reservation (see the Appointment Groups API), the id will indicate the time slot it is for. If this is a section-level event, this will be the course-level parent event. + */ + parent_event_id?: number | null; + /** + * The type of participant to sign up for a slot: 'User' or 'Group' + */ + participant_type?: string | null; + /** + * If the event is a time slot, this is the participant limit + */ + participants_per_appointment?: number | null; + /** + * If the event is a time slot, the API URL for reserving it + */ + reserve_url?: string | null; + /** + * If the event is a time slot, a boolean indicating whether the user has already made a reservation for it + */ + reserved?: boolean | null; + /** + * The start timestamp of the event + */ + start_at?: string | null; + /** + * The title of the calendar event + */ + title?: string | null; + /** + * When the calendar event was last updated + */ + updated_at?: string | null; + /** + * URL for this calendar event (to update, delete, etc.) + */ + url?: string; + /** + * If the event is a user-level reservation, this will contain the user participant JSON (refer to the Users API). + */ + user?: string | null; + /** + * Current state of the event ('active', 'locked' or 'deleted') 'locked' indicates that start_at/end_at cannot be changed (though the event could be deleted). Normally only reservations or time slots with reservations are locked (see the Appointment Groups API) + */ + workflow_state?: string | null; +}; + +export type CalendarLink = { + /** + * The URL of the calendar in ICS format + */ + ics?: string | null; +} | null; + +/** + * Describes a learning object change propagated to associated courses from a blueprint course + */ +export type ChangeRecord = { + /** + * The ID of the learning object that was changed in the blueprint course. + */ + asset_id?: number | null; + /** + * The name of the learning object that was changed in the blueprint course. + */ + asset_name?: string | null; + /** + * The type of the learning object that was changed in the blueprint course. One of 'assignment', 'attachment', 'discussion_topic', 'external_tool', 'quiz', or 'wiki_page'. + */ + asset_type?: string | null; + /** + * The type of change; one of 'created', 'updated', 'deleted' + */ + change_type?: string | null; + /** + * A list of ExceptionRecords for linked courses that did not receive this update. + */ + exceptions?: Array<{ + [key: string]: unknown; + }> | null; + /** + * The URL of the changed object + */ + html_url?: string | null; + /** + * Whether the object is locked in the blueprint + */ + locked?: boolean | null; +}; + +export type Collaboration = { + /** + * A name for the type of collaboration + */ + collaboration_type?: string | null; + /** + * The canvas id of the course or group to which the collaboration belongs + */ + context_id?: number | null; + /** + * The canvas type of the course or group to which the collaboration belongs + */ + context_type?: string | null; + /** + * The timestamp when the collaboration was created + */ + created_at?: string | null; + description?: string | null; + /** + * The collaboration document identifier for the collaboration provider + */ + document_id?: string | null; + /** + * The unique identifier for the collaboration + */ + id?: number | null; + title?: string | null; + /** + * Another representation of the collaboration type + */ + type?: string; + /** + * The LTI launch url to edit the collaboration + */ + update_url?: string | null; + /** + * The timestamp when the collaboration was last modified + */ + updated_at?: string | null; + /** + * The LTI launch url to view collaboration. + */ + url?: string; + /** + * The canvas id of the user who created the collaboration + */ + user_id?: number | null; + /** + * The name of the user who owns the collaboration + */ + user_name?: string | null; +}; + +export type Collaborator = { + /** + * The unique user or group identifier for the collaborator. + */ + id: number; + /** + * The name of the collaborator. + */ + name?: string | null; + /** + * The type of collaborator (e.g. 'user' or 'group'). + */ + type?: string | null; +}; + +/** + * ColumnDatum objects contain the entry for a column for each user. + */ +export type ColumnDatum = { + content?: string | null; + user_id?: number | null; +}; + +export type CommMessage = { + /** + * The plain text body of the message + */ + body?: string | null; + /** + * The date and time this message was created + */ + created_at?: string | null; + /** + * The address that was put in the 'from' field of the message + */ + from?: string | null; + /** + * The display name for the from address + */ + from_name?: string | null; + /** + * The HTML body of the message. + */ + html_body?: string | null; + /** + * The ID of the CommMessage. + */ + id?: number; + /** + * The reply_to header of the message + */ + reply_to?: string | null; + /** + * The date and time this message was sent + */ + sent_at?: string | null; + /** + * The message subject + */ + subject?: string | null; + /** + * The address the message was sent to: + */ + to?: string | null; + /** + * The workflow state of the message. One of 'created', 'staged', 'sending', 'sent', 'bounced', 'dashboard', 'cancelled', or 'closed' + */ + workflow_state?: string | null; +}; + +export type CommunicationChannel = { + /** + * The address, or path, of the communication channel. + */ + address?: string | null; + /** + * The ID of the communication channel. + */ + id?: number; + /** + * The position of this communication channel relative to the user's other channels when they are ordered. + */ + position?: number | null; + /** + * The type of communcation channel being described. Possible values are: 'email', 'push', 'sms', or 'twitter'. This field determines the type of value seen in 'address'. + */ + type?: string | null; + /** + * The ID of the user that owns this communication channel. + */ + user_id?: number | null; + /** + * The current state of the communication channel. Possible values are: 'unconfirmed' or 'active'. + */ + workflow_state?: string | null; +}; + +export type CompletionRequirement = { + /** + * whether the calling user has met this requirement (Optional; present only if the caller is a student or if the optional parameter 'student_id' is included) + */ + completed?: boolean | null; + /** + * minimum score required to complete (only present when type == 'min_score') + */ + min_score?: number | null; + /** + * one of 'must_view', 'must_submit', 'must_contribute', 'min_score' + */ + type?: string | null; +} | null; + +export type Conference = { + /** + * The 3rd party's ID for the conference + */ + conference_key?: string | null; + /** + * The type of conference + */ + conference_type?: string | null; + /** + * The description for the conference + */ + description?: string | null; + /** + * The expected duration the conference is supposed to last + */ + duration?: number | null; + /** + * The date that the conference ended at, null if it hasn't ended + */ + ended_at?: string | null; + /** + * True if the conference type has advanced settings. + */ + has_advanced_settings?: boolean | null; + /** + * The id of the conference + */ + id?: number; + /** + * URL to join the conference, may be null if the conference type doesn't set it + */ + join_url?: string | null; + /** + * If true the conference is long running and has no expected end time + */ + long_running?: boolean | null; + /** + * A List of recordings for the conference + */ + recordings?: Array | null; + /** + * The date the conference started at, null if it hasn't started + */ + started_at?: string | null; + /** + * The title of the conference + */ + title?: string | null; + /** + * URL for the conference, may be null if the conference type doesn't set it + */ + url?: string | null; + /** + * A collection of settings specific to the conference type + */ + user_settings?: { + [key: string]: unknown; + } | null; + /** + * Array of user ids that are participants in the conference + */ + users?: Array | null; +}; + +export type ConferenceRecording = { + created_at?: string | null; + duration_minutes?: number | null; + playback_url?: string | null; + title?: string | null; + updated_at?: string | null; +}; + +export type ContentDetails = { + due_at?: string | null; + lock_at?: string | null; + lock_explanation?: string | null; + lock_info?: LockInfo; + locked_for_user?: boolean | null; + points_possible?: number | null; + unlock_at?: string | null; +} | null; + +export type ContentExport = { + attachment?: FileNullable; + /** + * the date and time this export was requested + */ + created_at?: string | null; + /** + * the type of content migration: 'common_cartridge' or 'qti' + */ + export_type?: string | null; + /** + * the unique identifier for the export + */ + id?: number; + /** + * The api endpoint for polling the current progress + */ + progress_url?: string | null; + /** + * The ID of the user who started the export + */ + user_id?: number | null; + /** + * Current state of the content migration: created exporting exported failed + */ + workflow_state?: string | null; +}; + +export type ContentMigration = { + /** + * attachment api object for the uploaded file may not be present for all migrations + */ + attachment?: string | null; + /** + * timestamp + */ + finished_at?: string | null; + /** + * the unique identifier for the migration + */ + id?: number; + /** + * API url to the content migration's issues + */ + migration_issues_url?: string | null; + /** + * the type of content migration + */ + migration_type?: string | null; + /** + * the name of the content migration type + */ + migration_type_title?: string | null; + /** + * file uploading data, see {file:file_uploads.html File Upload Documentation} for file upload workflow This works a little differently in that all the file data is in the pre_attachment hash if there is no upload_url then there was an attachment pre-processing error, the error message will be in the message key This data will only be here after a create or update call + */ + pre_attachment?: string | null; + /** + * The api endpoint for polling the current progress + */ + progress_url?: string | null; + /** + * timestamp + */ + started_at?: string | null; + /** + * The user who started the migration + */ + user_id?: number | null; + /** + * Current state of the content migration: pre_processing, pre_processed, running, waiting_for_select, completed, failed + */ + workflow_state?: string | null; +}; + +export type ContextExternalTool = { + /** + * The consumer key used by the tool (The associated shared secret is not returned) + */ + consumer_key?: string | null; + /** + * The domain to match links against + */ + domain?: string | null; + /** + * The unique identifier for the tool + */ + id?: number; + /** + * The name of the tool + */ + name?: string | null; + /** + * The url to match links against + */ + url?: string | null; +}; + +export type Conversation = { + /** + * Array of user ids who are involved in the conversation, ordered by participation level, then alphabetical. Excludes current user, unless this is a monologue. + */ + audience?: Array | null; + /** + * Most relevant shared contexts (courses and groups) between current user and other participants. If there is only one participant, it will also include that user's enrollment(s)/ membership type(s) in each course/group. + */ + audience_contexts?: Array | null; + /** + * URL to appropriate icon for this conversation (custom, individual or group avatar, depending on audience). + */ + avatar_url?: string | null; + /** + * Name of the course or group in which the conversation is occurring. + */ + context_name?: string | null; + /** + * the unique identifier for the conversation. + */ + id?: number; + /** + * A <=100 character preview from the most recent message. + */ + last_message?: string | null; + /** + * the number of messages in the conversation. + */ + message_count?: number | null; + /** + * Array of users participating in the conversation. Includes current user. + */ + participants?: Array | null; + /** + * whether the conversation is private. + */ + private?: boolean | null; + /** + * Additional conversation flags (last_author, attachments, media_objects). Each listed property means the flag is set to true (i.e. the current user is the most recent author, there are attachments, or there are media objects) + */ + properties?: Array | null; + /** + * whether the conversation is starred. + */ + starred?: boolean | null; + /** + * the date and time at which the last message was sent. + */ + start_at?: string | null; + /** + * the subject of the conversation. + */ + subject?: string | null; + /** + * whether the current user is subscribed to the conversation. + */ + subscribed?: boolean | null; + /** + * indicates whether the conversation is visible under the current scope and filter. This attribute is always true in the index API response, and is primarily useful in create/update responses so that you can know if the record should be displayed in the UI. The default scope is assumed, unless a scope or filter is passed to the create/update API call. + */ + visible?: boolean | null; + /** + * The current state of the conversation (read, unread or archived). + */ + workflow_state?: string | null; +}; + +export type ConversationParticipant = { + /** + * If requested, this field will be included and contain a url to retrieve the user's avatar. + */ + avatar_url?: string | null; + /** + * The full name of the user. + */ + full_name?: string | null; + /** + * The user ID for the participant. + */ + id?: number; + /** + * A short name the user has selected, for use in conversations or other less formal places through the site. + */ + name?: string | null; +}; + +export type Course = { + /** + * optional: this will be true if this user is currently prevented from viewing the course because of date restriction settings + */ + access_restricted_by_date?: boolean | null; + /** + * the account associated with the course + */ + account_id?: number | null; + allow_student_assignment_edits?: boolean | null; + allow_student_forum_attachments?: boolean | null; + allow_wiki_comments?: boolean | null; + /** + * weight final grade based on assignment group percentages + */ + apply_assignment_group_weights?: boolean | null; + /** + * optional: whether the course is set as a Blueprint Course (blueprint fields require the Blueprint Courses feature) + */ + blueprint?: boolean | null; + /** + * optional: Set of restrictions applied to all locked course objects + */ + blueprint_restrictions?: { + [key: string]: unknown; + } | null; + /** + * optional: Sets of restrictions differentiated by object type applied to locked course objects + */ + blueprint_restrictions_by_object_type?: { + [key: string]: unknown; + } | null; + calendar?: CalendarLink; + /** + * the course code + */ + course_code?: string | null; + /** + * Not specified in Canvas API spec, I'm just guessing the type here + */ + course_color?: string | null; + course_format?: string | null; + course_progress?: CourseProgress; + /** + * the date the course was created. + */ + created_at?: string | null; + /** + * the type of page that users will see when they first visit the course - 'feed': Recent Activity Dashboard - 'wiki': Wiki Front Page - 'modules': Course Modules/Sections Page - 'assignments': Course Assignments List - 'syllabus': Course Syllabus Page other types may be added in the future + */ + default_view?: string | null; + /** + * the end date for the course, if applicable + */ + end_at?: string | null; + /** + * the enrollment term associated with the course + */ + enrollment_term_id?: number | null; + /** + * A list of enrollments linking the current user to the course. for student enrollments, grading information may be included if include[]=total_scores + */ + enrollments?: Array | null; + /** + * Not specified in Canvas API spec, I'm just guessing the type here + */ + friendly_name?: string | null; + /** + * The grade_passback_setting on this course + */ + grade_passback_setting?: string | null; + /** + * A list of grading periods associated with the course + */ + grading_periods?: Array | null; + /** + * the grading standard associated with the course + */ + grading_standard_id?: number | null; + hide_final_grades?: boolean | null; + homeroom_course?: boolean | null; + /** + * the unique identifier for the course + */ + id?: number; + /** + * the integration identifier for the course, if defined. This field is only included if the user has permission to view SIS information. + */ + integration_id?: string | null; + is_public?: boolean | null; + is_public_to_auth_users?: boolean | null; + license?: string | null; + /** + * the course-set locale, if applicable + */ + locale?: string | null; + /** + * the full name of the course + */ + name?: string | null; + /** + * optional: the number of submissions needing grading returned only if the current user has grading rights and include[]=needs_grading_count + */ + needs_grading_count?: number | null; + open_enrollment?: boolean | null; + original_name?: string | null; + /** + * optional: the permissions the user has for the course. returned only for a single course and include[]=permissions + */ + permissions?: { + [key: string]: unknown; + } | null; + /** + * optional: the public description of the course + */ + public_description?: string | null; + public_syllabus?: boolean | null; + public_syllabus_to_auth?: boolean | null; + restrict_enrollments_to_course_dates?: boolean | null; + /** + * the root account associated with the course + */ + root_account_id?: number | null; + self_enrollment?: boolean | null; + /** + * the SIS identifier for the course, if defined. This field is only included if the user has permission to view SIS information. + */ + sis_course_id?: string | null; + /** + * the unique identifier for the SIS import. This field is only included if the user has permission to manage SIS information. + */ + sis_import_id?: number | null; + /** + * the start date for the course, if applicable + */ + start_at?: string | null; + storage_quota_mb?: number | null; + storage_quota_used_mb?: number | null; + /** + * optional: user-generated HTML for the course syllabus + */ + syllabus_body?: string | null; + /** + * optional: whether the course is set as a template (requires the course templates feature) + */ + template?: boolean | null; + term?: Term; + /** + * The course's IANA time zone name. + */ + time_zone?: string | null; + /** + * optional: the total number of active and invited students in the course + */ + total_students?: number | null; + /** + * the UUID of the course + */ + uuid?: string | null; + /** + * the current state of the course one of 'unpublished', 'available', 'completed', or 'deleted' + */ + workflow_state?: string | null; +}; + +export type CourseWithIncludes = { + /** + * optional: this will be true if this user is currently prevented from viewing the course because of date restriction settings + */ + access_restricted_by_date?: boolean | null; + /** + * the account associated with the course + */ + account_id?: number | null; + allow_student_assignment_edits?: boolean | null; + allow_student_forum_attachments?: boolean | null; + allow_wiki_comments?: boolean | null; + /** + * weight final grade based on assignment group percentages + */ + apply_assignment_group_weights?: boolean | null; + /** + * optional: whether the course is set as a Blueprint Course (blueprint fields require the Blueprint Courses feature) + */ + blueprint?: boolean | null; + /** + * optional: Set of restrictions applied to all locked course objects + */ + blueprint_restrictions?: { + [key: string]: unknown; + } | null; + /** + * optional: Sets of restrictions differentiated by object type applied to locked course objects + */ + blueprint_restrictions_by_object_type?: { + [key: string]: unknown; + } | null; + calendar?: CalendarLink; + /** + * the course code + */ + course_code?: string | null; + /** + * Not specified in Canvas API spec, I'm just guessing the type here + */ + course_color?: string | null; + course_format?: string | null; + course_progress?: CourseProgress; + /** + * the date the course was created. + */ + created_at?: string | null; + /** + * the type of page that users will see when they first visit the course - 'feed': Recent Activity Dashboard - 'wiki': Wiki Front Page - 'modules': Course Modules/Sections Page - 'assignments': Course Assignments List - 'syllabus': Course Syllabus Page other types may be added in the future + */ + default_view?: string | null; + /** + * the end date for the course, if applicable + */ + end_at?: string | null; + /** + * the enrollment term associated with the course + */ + enrollment_term_id?: number | null; + /** + * A list of enrollments linking the current user to the course. for student enrollments, grading information may be included if include[]=total_scores + */ + enrollments?: Array | null; + /** + * Not specified in Canvas API spec, I'm just guessing the type here + */ + friendly_name?: string | null; + /** + * The grade_passback_setting on this course + */ + grade_passback_setting?: string | null; + /** + * A list of grading periods associated with the course + */ + grading_periods?: Array | null; + /** + * the grading standard associated with the course + */ + grading_standard_id?: number | null; + hide_final_grades?: boolean | null; + homeroom_course?: boolean | null; + /** + * the unique identifier for the course + */ + id?: number; + /** + * the integration identifier for the course, if defined. This field is only included if the user has permission to view SIS information. + */ + integration_id?: string | null; + is_public?: boolean | null; + is_public_to_auth_users?: boolean | null; + license?: string | null; + /** + * the course-set locale, if applicable + */ + locale?: string | null; + /** + * the full name of the course + */ + name?: string | null; + /** + * optional: the number of submissions needing grading returned only if the current user has grading rights and include[]=needs_grading_count + */ + needs_grading_count?: number | null; + open_enrollment?: boolean | null; + original_name?: string | null; + /** + * optional: the permissions the user has for the course. returned only for a single course and include[]=permissions + */ + permissions?: { + [key: string]: unknown; + } | null; + /** + * optional: the public description of the course + */ + public_description?: string | null; + public_syllabus?: boolean | null; + public_syllabus_to_auth?: boolean | null; + restrict_enrollments_to_course_dates?: boolean | null; + /** + * the root account associated with the course + */ + root_account_id?: number | null; + /** + * A list of sections for this course. + */ + sections?: Array
| null; + self_enrollment?: boolean | null; + /** + * the SIS identifier for the course, if defined. This field is only included if the user has permission to view SIS information. + */ + sis_course_id?: string | null; + /** + * the unique identifier for the SIS import. This field is only included if the user has permission to manage SIS information. + */ + sis_import_id?: number | null; + /** + * the start date for the course, if applicable + */ + start_at?: string | null; + storage_quota_mb?: number | null; + storage_quota_used_mb?: number | null; + /** + * optional: user-generated HTML for the course syllabus + */ + syllabus_body?: string | null; + /** + * optional: whether the course is set as a template (requires the course templates feature) + */ + template?: boolean | null; + term?: Term; + /** + * The course's IANA time zone name. + */ + time_zone?: string | null; + /** + * optional: the total number of active and invited students in the course + */ + total_students?: number | null; + /** + * the UUID of the course + */ + uuid?: string | null; + /** + * the current state of the course one of 'unpublished', 'available', 'completed', or 'deleted' + */ + workflow_state?: string | null; +}; + +/** + * Combination of a Course & EpubExport. + */ +export type CourseEpubExport = { + epub_export?: EpubExportNullable; + /** + * the unique identifier for the course + */ + id?: number; + /** + * the name for the course + */ + name?: string | null; +}; + +export type CourseEvent = { + /** + * timestamp of the event + */ + created_at?: string | null; + /** + * Course event data depending on the event type. This will return an object containing the relevant event data. An updated event type will return an UpdatedEventData object. + */ + event_data?: string | null; + /** + * Course event source depending on the event type. This will return a string containing the source of the event. + */ + event_source?: string | null; + /** + * Course event type The event type defines the type and schema of the event_data object. + */ + event_type?: string | null; + /** + * ID of the event. + */ + id?: string; + links?: CourseEventLink; +}; + +export type CourseEventLink = { + /** + * ID of the course that this course was copied from. This is only included if the event_type is copied_from. + */ + copied_from?: number | null; + /** + * ID of the course that this course was copied to. This is only included if the event_type is copied_to. + */ + copied_to?: number | null; + /** + * ID of the course for the event. + */ + course?: number | null; + /** + * ID of the page view during the event if it exists. + */ + page_view?: string | null; + /** + * ID of the SIS batch that triggered the event. + */ + sis_batch?: number | null; + /** + * ID of the user for the event (who made the change). + */ + user?: number | null; +} | null; + +export type CourseNickname = { + /** + * the ID of the course + */ + course_id?: number | null; + /** + * the actual name of the course + */ + name?: string | null; + /** + * the calling user's nickname for the course + */ + nickname?: string | null; +}; + +export type CourseProgress = { + /** + * date the course was completed. null if the course has not been completed by this user + */ + completed_at?: string | null; + /** + * url to next module item that has an unmet requirement. null if the user has completed the course or the current module does not require sequential progress + */ + next_requirement_url?: string | null; + /** + * total number of requirements the user has completed from all modules + */ + requirement_completed_count?: number | null; + /** + * total number of requirements from all modules + */ + requirement_count?: number | null; +} | null; + +export type CustomColors = { + custom_colors?: { + [key: string]: string; + } | null; +}; + +export type CustomColumn = { + /** + * won't be displayed if hidden is true + */ + hidden?: boolean | null; + /** + * The ID of the custom gradebook column + */ + id?: number; + /** + * column order + */ + position?: number | null; + /** + * won't be editable in the gradebook UI + */ + read_only?: boolean | null; + /** + * When true, this column's visibility will be toggled in the Gradebook when a user selects to show or hide notes + */ + teacher_notes?: boolean | null; + /** + * header text + */ + title?: string | null; +}; + +export type Day = { + /** + * the date represented by this entry + */ + date?: string | null; + /** + * an array of the graders who were responsible for the submissions in this response. the submissions are grouped according to the person who graded them and the assignment they were submitted for. + */ + graders?: number | null; +}; + +/** + * A discussion topic + */ +export type DiscussionTopic = { + /** + * Whether or not users can rate entries in this topic. + */ + allow_rating?: boolean | null; + /** + * The unique identifier of the assignment if the topic is for grading, otherwise null. + */ + assignment_id?: number | null; + /** + * Array of file attachments. + */ + attachments?: Array | null; + /** + * The datetime to publish the topic (if not right away). + */ + delayed_post_at?: string | null; + /** + * The count of entries in the topic. + */ + discussion_subentry_count?: number | null; + /** + * The type of discussion. Values are 'side_comment', for discussions that only allow one level of nested comments, and 'threaded' for fully threaded discussions. + */ + discussion_type?: string | null; + /** + * The unique identifier of the group category if the topic is a group discussion, otherwise null. + */ + group_category_id?: number | null; + /** + * An array of group discussions the user is a part of. Fields include: id, group_id + */ + group_topic_children?: Array<{ + [key: string]: unknown; + }> | null; + /** + * The URL to the discussion topic in canvas. + */ + html_url?: string | null; + /** + * The ID of this topic. + */ + id?: number; + /** + * The datetime for when the last reply was in the topic. + */ + last_reply_at?: string | null; + /** + * The datetime to lock the topic (if ever). + */ + lock_at?: string | null; + /** + * (Optional) An explanation of why this is locked for the user. Present when locked_for_user is true. + */ + lock_explanation?: string | null; + lock_info?: LockInfo; + /** + * Whether or not the discussion is 'closed for comments'. + */ + locked?: boolean | null; + /** + * Whether or not this is locked for the user. + */ + locked_for_user?: boolean | null; + /** + * The HTML content of the message body. + */ + message?: string | null; + /** + * Whether or not grade permissions are required to rate entries. + */ + only_graders_can_rate?: boolean | null; + /** + * The current user's permissions on this topic. + */ + permissions?: { + [key: string]: unknown; + } | null; + /** + * Whether or not the discussion has been 'pinned' by an instructor + */ + pinned?: boolean | null; + /** + * If the topic is a podcast topic this is the feed url for the current user. + */ + podcast_url?: string | null; + /** + * The datetime the topic was posted. If it is null it hasn't been posted yet. (see delayed_post_at) + */ + posted_at?: string | null; + /** + * Whether this discussion topic is published (true) or draft state (false) + */ + published?: boolean | null; + /** + * The read_state of the topic for the current user, 'read' or 'unread'. + */ + read_state?: string | null; + /** + * If true then a user may not respond to other replies until that user has made an initial reply. Defaults to false. + */ + require_initial_post?: boolean | null; + /** + * If the topic is for grading and a group assignment this will point to the original topic in the course. + */ + root_topic_id?: number | null; + /** + * Whether or not entries should be sorted by rating. + */ + sort_by_rating?: boolean | null; + /** + * Whether or not the current user is subscribed to this topic. + */ + subscribed?: boolean | null; + /** + * (Optional) Why the user cannot subscribe to this topic. Only one reason will be returned even if multiple apply. Can be one of: 'initial_post_required': The user must post a reply first; 'not_in_group_set': The user is not in the group set for this graded group discussion; 'not_in_group': The user is not in this topic's group; 'topic_is_announcement': This topic is an announcement + */ + subscription_hold?: string | null; + /** + * The topic title. + */ + title?: string | null; + /** + * DEPRECATED An array of topic_ids for the group discussions the user is a part of. + */ + topic_children?: Array | null; + /** + * The count of unread entries of this topic for the current user. + */ + unread_count?: number | null; + /** + * Whether or not posts in this topic are visible to the user. + */ + user_can_see_posts?: boolean | null; + /** + * The username of the topic creator. + */ + user_name?: string | null; +}; + +/** + * A discussion topic + */ +export type DiscussionTopicNullable = { + /** + * Whether or not users can rate entries in this topic. + */ + allow_rating?: boolean | null; + /** + * The unique identifier of the assignment if the topic is for grading, otherwise null. + */ + assignment_id?: number | null; + /** + * Array of file attachments. + */ + attachments?: Array | null; + /** + * The datetime to publish the topic (if not right away). + */ + delayed_post_at?: string | null; + /** + * The count of entries in the topic. + */ + discussion_subentry_count?: number | null; + /** + * The type of discussion. Values are 'side_comment', for discussions that only allow one level of nested comments, and 'threaded' for fully threaded discussions. + */ + discussion_type?: string | null; + /** + * The unique identifier of the group category if the topic is a group discussion, otherwise null. + */ + group_category_id?: number | null; + /** + * An array of group discussions the user is a part of. Fields include: id, group_id + */ + group_topic_children?: Array<{ + [key: string]: unknown; + }> | null; + /** + * The URL to the discussion topic in canvas. + */ + html_url?: string | null; + /** + * The ID of this topic. + */ + id?: number; + /** + * The datetime for when the last reply was in the topic. + */ + last_reply_at?: string | null; + /** + * The datetime to lock the topic (if ever). + */ + lock_at?: string | null; + /** + * (Optional) An explanation of why this is locked for the user. Present when locked_for_user is true. + */ + lock_explanation?: string | null; + lock_info?: LockInfo; + /** + * Whether or not the discussion is 'closed for comments'. + */ + locked?: boolean | null; + /** + * Whether or not this is locked for the user. + */ + locked_for_user?: boolean | null; + /** + * The HTML content of the message body. + */ + message?: string | null; + /** + * Whether or not grade permissions are required to rate entries. + */ + only_graders_can_rate?: boolean | null; + /** + * The current user's permissions on this topic. + */ + permissions?: { + [key: string]: unknown; + } | null; + /** + * Whether or not the discussion has been 'pinned' by an instructor + */ + pinned?: boolean | null; + /** + * If the topic is a podcast topic this is the feed url for the current user. + */ + podcast_url?: string | null; + /** + * The datetime the topic was posted. If it is null it hasn't been posted yet. (see delayed_post_at) + */ + posted_at?: string | null; + /** + * Whether this discussion topic is published (true) or draft state (false) + */ + published?: boolean | null; + /** + * The read_state of the topic for the current user, 'read' or 'unread'. + */ + read_state?: string | null; + /** + * If true then a user may not respond to other replies until that user has made an initial reply. Defaults to false. + */ + require_initial_post?: boolean | null; + /** + * If the topic is for grading and a group assignment this will point to the original topic in the course. + */ + root_topic_id?: number | null; + /** + * Whether or not entries should be sorted by rating. + */ + sort_by_rating?: boolean | null; + /** + * Whether or not the current user is subscribed to this topic. + */ + subscribed?: boolean | null; + /** + * (Optional) Why the user cannot subscribe to this topic. Only one reason will be returned even if multiple apply. Can be one of: 'initial_post_required': The user must post a reply first; 'not_in_group_set': The user is not in the group set for this graded group discussion; 'not_in_group': The user is not in this topic's group; 'topic_is_announcement': This topic is an announcement + */ + subscription_hold?: string | null; + /** + * The topic title. + */ + title?: string | null; + /** + * DEPRECATED An array of topic_ids for the group discussions the user is a part of. + */ + topic_children?: Array | null; + /** + * The count of unread entries of this topic for the current user. + */ + unread_count?: number | null; + /** + * Whether or not posts in this topic are visible to the user. + */ + user_can_see_posts?: boolean | null; + /** + * The username of the topic creator. + */ + user_name?: string | null; +} | null; + +export type Enrollment = { + /** + * The unique id of the associated user. Will be null unless type is ObserverEnrollment. + */ + associated_user_id?: number | null; + /** + * optional: The letter grade equivalent of computed_current_score, if available. (applies only to student enrollments, and only available in course endpoints) + */ + computed_current_grade?: string | null; + /** + * optional: The student's score in the course, ignoring ungraded assignments. (applies only to student enrollments, and only available in course endpoints) + */ + computed_current_score?: number | null; + /** + * optional: The letter grade equivalent of computed_final_score, if available. (applies only to student enrollments, and only available in course endpoints) + */ + computed_final_grade?: string | null; + /** + * optional: The student's score in the course including ungraded assignments with a score of 0. (applies only to student enrollments, and only available in course endpoints) + */ + computed_final_score?: number | null; + /** + * The unique id of the course. + */ + course_id?: number | null; + /** + * The Course Integration ID in which the enrollment is associated. This field is only included if the user has permission to view SIS information. + */ + course_integration_id?: string | null; + /** + * The unique id of the user's section. + */ + course_section_id?: number | null; + /** + * The created time of the enrollment, in ISO8601 format. + */ + created_at?: string | null; + /** + * optional: The id of the currently active grading period, if one exists. If the course the enrollment belongs to does not have grading periods, or if no currently active grading period exists, the value will be null. (applies only to student enrollments, and only available in course endpoints) + */ + current_grading_period_id?: number | null; + /** + * optional: The name of the currently active grading period, if one exists. If the course the enrollment belongs to does not have grading periods, or if no currently active grading period exists, the value will be null. (applies only to student enrollments, and only available in course endpoints) + */ + current_grading_period_title?: string | null; + /** + * optional: The letter grade equivalent of current_period_computed_current_score, if available. If the course the enrollment belongs to does not have grading periods, or if no currently active grading period exists, the value will be null. (applies only to student enrollments, and only available in course endpoints) + */ + current_period_computed_current_grade?: string | null; + /** + * optional: The student's score in the course for the current grading period, ignoring ungraded assignments. If the course the enrollment belongs to does not have grading periods, or if no currently active grading period exists, the value will be null. (applies only to student enrollments, and only available in course endpoints) + */ + current_period_computed_current_score?: number | null; + /** + * optional: The letter grade equivalent of current_period_computed_final_score, if available. If the course the enrollment belongs to does not have grading periods, or if no currently active grading period exists, the value will be null. (applies only to student enrollments, and only available in course endpoints) + */ + current_period_computed_final_grade?: string | null; + /** + * optional: The student's score in the course for the current grading period, including ungraded assignments with a score of 0. If the course the enrollment belongs to does not have grading periods, or if no currently active grading period exists, the value will be null. (applies only to student enrollments, and only available in course endpoints) + */ + current_period_computed_final_score?: number | null; + /** + * The user's override grade for the current grading period. + */ + current_period_override_grade?: string | null; + /** + * The user's override score for the current grading period. + */ + current_period_override_score?: number | null; + /** + * optional: The letter grade equivalent of current_period_unposted_current_score, if available. Only included if user has permission to view this grade, typically teachers, TAs, and admins. If the course the enrollment belongs to does not have grading periods, or if no currently active grading period exists, the value will be null. (applies only to student enrollments, and only available in course endpoints) + */ + current_period_unposted_current_grade?: string | null; + /** + * optional: The student's score in the course for the current grading period, including muted/unposted assignments. Only included if user has permission to view this score, typically teachers, TAs, and admins. If the course the enrollment belongs to does not have grading periods, or if no currently active grading period exists, the value will be null. (applies only to student enrollments, and only available in course endpoints) + */ + current_period_unposted_current_score?: number | null; + /** + * optional: The letter grade equivalent of current_period_unposted_final_score, if available. Only included if user has permission to view this grade, typically teachers, TAs, and admins. If the course the enrollment belongs to does not have grading periods, or if no currently active grading period exists, the value will be null. (applies only to student enrollments, and only available in course endpoints) + */ + current_period_unposted_final_grade?: string | null; + /** + * optional: The student's score in the course for the current grading period, including muted/unposted assignments and including ungraded assignments with a score of 0. Only included if user has permission to view this score, typically teachers, TAs, and admins. If the course the enrollment belongs to does not have grading periods, or if no currently active grading period exists, the value will be null. (applies only to student enrollments, and only available in course endpoints) + */ + current_period_unposted_final_score?: number | null; + /** + * The end time of the enrollment, in ISO8601 format. + */ + end_at?: string | null; + /** + * The state of the user's enrollment in the course. + */ + enrollment_state?: string | null; + grades?: Grade; + /** + * optional: Indicates whether the course the enrollment belongs to has grading periods set up. (applies only to student enrollments, and only available in course endpoints) + */ + has_grading_periods?: boolean | null; + /** + * The URL to the Canvas web UI page for this course enrollment. + */ + html_url?: string | null; + /** + * The ID of the enrollment. + */ + id?: number; + /** + * The last activity time of the user for the enrollment, in ISO8601 format. + */ + last_activity_at?: string | null; + /** + * The last attended date of the user for the enrollment in a course, in ISO8601 format. + */ + last_attended_at?: string | null; + /** + * User can only access his or her own course section. + */ + limit_privileges_to_course_section?: boolean | null; + /** + * The user's override grade for the course. + */ + override_grade?: string | null; + /** + * The user's override score for the course. + */ + override_score?: number | null; + /** + * The enrollment role, for course-level permissions. This field will match `type` if the enrollment role has not been customized. + */ + role?: string | null; + /** + * The id of the enrollment role. + */ + role_id?: number | null; + /** + * The unique id of the user's account. + */ + root_account_id?: number | null; + /** + * The Section Integration ID in which the enrollment is associated. This field is only included if the user has permission to view SIS information. + */ + section_integration_id?: string | null; + /** + * The SIS Account ID in which the enrollment is associated. Only displayed if present. This field is only included if the user has permission to view SIS information. + */ + sis_account_id?: string | null; + /** + * The SIS Course ID in which the enrollment is associated. Only displayed if present. This field is only included if the user has permission to view SIS information. + */ + sis_course_id?: string | null; + /** + * The unique identifier for the SIS import. This field is only included if the user has permission to manage SIS information. + */ + sis_import_id?: number | null; + /** + * The SIS Section ID in which the enrollment is associated. Only displayed if present. This field is only included if the user has permission to view SIS information. + */ + sis_section_id?: string | null; + /** + * The SIS User ID in which the enrollment is associated. Only displayed if present. This field is only included if the user has permission to view SIS information. + */ + sis_user_id?: string | null; + /** + * The start time of the enrollment, in ISO8601 format. + */ + start_at?: string | null; + /** + * The total activity time of the user for the enrollment, in seconds. + */ + total_activity_time?: number | null; + /** + * optional: Indicates whether the course the enrollment belongs to has the Display Totals for 'All Grading Periods' feature enabled. (applies only to student enrollments, and only available in course endpoints) + */ + totals_for_all_grading_periods_option?: boolean | null; + /** + * The enrollment type. One of 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'DesignerEnrollment', 'ObserverEnrollment'. + */ + type?: string | null; + /** + * The user's current grade in the class including muted/unposted assignments. Only included if user has permissions to view this grade, typically teachers, TAs, and admins. + */ + unposted_current_grade?: string | null; + /** + * The user's current score in the class including muted/unposted assignments. Only included if user has permissions to view this score, typically teachers, TAs, and admins.. + */ + unposted_current_score?: string | null; + /** + * The user's final grade for the class including muted/unposted assignments. Only included if user has permissions to view this grade, typically teachers, TAs, and admins.. + */ + unposted_final_grade?: string | null; + /** + * The user's final score for the class including muted/unposted assignments. Only included if user has permissions to view this score, typically teachers, TAs, and admins.. + */ + unposted_final_score?: number | null; + /** + * The updated time of the enrollment, in ISO8601 format. + */ + updated_at?: string | null; + user?: UserNullable; + /** + * The unique id of the user. + */ + user_id?: number | null; +}; + +export type EnrollmentTerm = { + /** + * The datetime of the end of the term. + */ + end_at?: string | null; + /** + * The unique identifier for the enrollment term. + */ + id?: number; + /** + * The name of the term. + */ + name?: string | null; + /** + * Term date overrides for specific enrollment types + */ + overrides?: { + [key: string]: unknown; + } | null; + /** + * the unique identifier for the SIS import. This field is only included if the user has permission to manage SIS information. + */ + sis_import_id?: number | null; + /** + * The SIS id of the term. Only included if the user has permission to view SIS information. + */ + sis_term_id?: string | null; + /** + * The datetime of the start of the term. + */ + start_at?: string | null; + /** + * The state of the term. Can be 'active' or 'deleted'. + */ + workflow_state?: string | null; +}; + +export type EpubExport = { + attachment?: FileNullable; + /** + * the date and time this export was requested + */ + created_at?: string | null; + /** + * the unique identifier for the export + */ + id?: number; + /** + * The api endpoint for polling the current progress + */ + progress_url?: string | null; + /** + * The ID of the user who started the export + */ + user_id?: number | null; + /** + * Current state of the ePub export: created exporting exported generating generated failed + */ + workflow_state?: string | null; +}; + +export type EpubExportNullable = { + attachment?: FileNullable; + /** + * the date and time this export was requested + */ + created_at?: string | null; + /** + * the unique identifier for the export + */ + id?: number; + /** + * The api endpoint for polling the current progress + */ + progress_url?: string | null; + /** + * The ID of the user who started the export + */ + user_id?: number | null; + /** + * Current state of the ePub export: created exporting exported generating generated failed + */ + workflow_state?: string | null; +} | null; + +export type ExternalFeed = { + /** + * When this external feed was added to Canvas + */ + created_at?: string | null; + /** + * The title of the feed, pulled from the feed itself. If the feed hasn't yet been pulled, a temporary name will be synthesized based on the URL + */ + display_name?: string | null; + /** + * If not null, only feed entries whose title contains this string will trigger new posts in Canvas + */ + header_match?: string | null; + /** + * The ID of the feed + */ + id?: number; + /** + * The HTTP/HTTPS URL to the feed + */ + url?: string | null; + /** + * The verbosity setting determines how much of the feed's content is imported into Canvas as part of the posting. 'link_only' means that only the title and a link to the item. 'truncate' means that a summary of the first portion of the item body will be used. 'full' means that the full item body will be used. + */ + verbosity?: string | null; +}; + +export type ExternalToolTagAttributes = { + /** + * Whether or not there is a new tab for the external tool + */ + new_tab?: boolean | null; + /** + * the identifier for this tool_tag + */ + resource_link_id?: string | null; + /** + * URL to the external tool + */ + url?: string | null; +} | null; + +export type Favorite = { + /** + * The ID of the object the Favorite refers to + */ + context_id?: number | null; + /** + * The type of the object the Favorite refers to (currently, only 'Course' is supported) + */ + context_type?: string | null; +}; + +export type Feature = { + /** + * The type of object the feature applies to (RootAccount, Account, Course, or User): + * * RootAccount features may only be controlled by flags on root accounts. + * * Account features may be controlled by flags on accounts and their parent accounts. + * * Course features may be controlled by flags on courses and their parent accounts. + * * User features may be controlled by flags on users and site admin only. + */ + applies_to?: string | null; + /** + * Whether the details of the feature are autoexpanded on page load vs. the user clicking to expand. + */ + autoexpand?: boolean | null; + /** + * Whether the feature is a beta feature. If true, the feature may not be fully polished and may be subject to change in the future. + */ + beta?: boolean | null; + /** + * Whether the feature is in active development. Features in this state are only visible in test and beta instances and are not yet available for production use. + */ + development?: boolean | null; + /** + * The user-visible name of the feature + */ + display_name?: string | null; + /** + * The date this feature will be globally enabled, or null if this is not planned. (This information is subject to change.) + */ + enable_at?: string | null; + feature_flag?: FeatureFlagNullable; + /** + * The symbolic name of the feature, used in FeatureFlags + */ + name?: string | null; + /** + * A URL to the release notes describing the feature + */ + release_notes_url?: string | null; + /** + * If true, a feature that is 'allowed' globally will be 'off' by default in root accounts. Otherwise, root accounts inherit the global 'allowed' setting, which allows sub-accounts and courses to turn features on with no root account action. + */ + root_opt_in?: boolean | null; +}; + +export type FeatureFlag = { + /** + * The id of the object to which this flag applies (This field is not present if this FeatureFlag represents the global Canvas default) + */ + context_id?: number | null; + /** + * The type of object to which this flag applies (Account, Course, or User). (This field is not present if this FeatureFlag represents the global Canvas default) + */ + context_type?: string | null; + /** + * The feature this flag controls + */ + feature?: string | null; + /** + * If set, this feature flag cannot be changed in the caller's context because the flag is set 'off' or 'on' in a higher context + */ + locked?: boolean | null; + /** + * The policy for the feature at this context. can be 'off', 'allowed', or 'on'. + */ + state?: string | null; +}; + +export type FeatureFlagNullable = { + /** + * The id of the object to which this flag applies (This field is not present if this FeatureFlag represents the global Canvas default) + */ + context_id?: number | null; + /** + * The type of object to which this flag applies (Account, Course, or User). (This field is not present if this FeatureFlag represents the global Canvas default) + */ + context_type?: string | null; + /** + * The feature this flag controls + */ + feature?: string | null; + /** + * If set, this feature flag cannot be changed in the caller's context because the flag is set 'off' or 'on' in a higher context + */ + locked?: boolean | null; + /** + * The policy for the feature at this context. can be 'off', 'allowed', or 'on'. + */ + state?: string | null; +} | null; + +/** + * A mapping of Canvas attribute names to attribute names that a provider may send, in order to update the value of these attributes when a user logs in. The values can be a FederatedAttributeConfig, or a raw string corresponding to the "attribute" property of a FederatedAttributeConfig. In responses, full FederatedAttributeConfig objects are returned if JIT provisioning is enabled, otherwise just the attribute names are returned. + */ +export type FederatedAttributesConfig = { + /** + * A comma separated list of role names to grant to the user. Note that these only apply at the root account level, and not sub-accounts. If the attribute is not marked for provisioning only, the user will also be removed from any other roles they currently hold that are not still specified by the IdP. + */ + admin_roles?: string | null; + /** + * The full display name of the user + */ + display_name?: string | null; + /** + * The user's e-mail address + */ + email?: string | null; + /** + * The first, or given, name of the user + */ + given_name?: string | null; + /** + * The secondary unique identifier for SIS purposes + */ + integration_id?: string | null; + /** + * The user's preferred locale/language + */ + locale?: string | null; + /** + * The full name of the user + */ + name?: string | null; + /** + * The unique SIS identifier + */ + sis_user_id?: string | null; + /** + * The full name of the user for sorting purposes + */ + sortable_name?: string | null; + /** + * The surname, or last name, of the user + */ + surname?: string | null; + /** + * The user's preferred time zone + */ + timezone?: string | null; +} | null; + +export type File = { + 'content-type'?: string | null; + created_at?: string | null; + display_name?: string | null; + id?: number; + size?: number | null; + updated_at?: string | null; + url?: string | null; +}; + +export type FileNullable = { + 'content-type'?: string | null; + created_at?: string | null; + display_name?: string | null; + id?: number; + size?: number | null; + updated_at?: string | null; + url?: string | null; +} | null; + +/** + * A file attachment + */ +export type FileAttachment = { + 'content-type'?: string | null; + display_name?: string | null; + filename?: string | null; + url?: string | null; +}; + +export type Folder = { + context_id?: number | null; + context_type?: string | null; + created_at?: string | null; + files_count?: number | null; + files_url?: string | null; + folders_count?: number | null; + folders_url?: string | null; + /** + * If true, indicates this is a read-only folder containing files submitted to assignments + */ + for_submissions?: boolean | null; + full_name?: string | null; + hidden?: boolean | null; + hidden_for_user?: boolean | null; + id?: number; + lock_at?: string | null; + locked?: boolean | null; + locked_for_user?: boolean | null; + name?: string | null; + parent_folder_id?: number | null; + position?: number | null; + unlock_at?: string | null; + updated_at?: string | null; +}; + +export type Grade = { + /** + * The user's current grade in the class. Only included if user has permissions to view this grade. + */ + current_grade?: string | null; + /** + * The user's current score in the class. Only included if user has permissions to view this score. + */ + current_score?: number | null; + /** + * The user's final grade for the class. Only included if user has permissions to view this grade. + */ + final_grade?: string | null; + /** + * The user's final score for the class. Only included if user has permissions to view this score. + */ + final_score?: number | null; + /** + * The URL to the Canvas web UI page for the user's grades, if this is a student enrollment. + */ + html_url?: string | null; + /** + * The user's current grade in the class including muted/unposted assignments. Only included if user has permissions to view this grade, typically teachers, TAs, and admins. + */ + unposted_current_grade?: string | null; + /** + * The user's current score in the class including muted/unposted assignments. Only included if user has permissions to view this score, typically teachers, TAs, and admins.. + */ + unposted_current_score?: number | null; + /** + * The user's final grade for the class including muted/unposted assignments. Only included if user has permissions to view this grade, typically teachers, TAs, and admins.. + */ + unposted_final_grade?: string | null; + /** + * The user's final score for the class including muted/unposted assignments. Only included if user has permissions to view this score, typically teachers, TAs, and admins.. + */ + unposted_final_score?: number | null; +} | null; + +export type GradeChangeEvent = { + /** + * timestamp of the event + */ + created_at?: string | null; + /** + * GradeChange event type + */ + event_type?: string | null; + /** + * Boolean indicating whether the submission was excused after the change. + */ + excused_after?: boolean | null; + /** + * Boolean indicating whether the submission was excused before the change. + */ + excused_before?: boolean | null; + /** + * The grade after the change. + */ + grade_after?: string | null; + /** + * The grade before the change. + */ + grade_before?: string | null; + /** + * Boolean indicating whether the student name was visible when the grade was given. Could be null if the grade change record was created before this feature existed. + */ + graded_anonymously?: boolean | null; + /** + * ID of the event. + */ + id?: string; + links?: GradeChangeEventLinks; + /** + * The unique request id of the request during the grade change. + */ + request_id?: string | null; + /** + * Version Number of the grade change submission. + */ + version_number?: string | null; +}; + +export type GradeChangeEventLinks = { + /** + * ID of the assignment associated with the event + */ + assignment?: number | null; + /** + * ID of the course associated with the event. will match the context_id in the associated assignment if the context type for the assignment is a course + */ + course?: number | null; + /** + * ID of the grader associated with the event. will match the grader_id in the associated submission. + */ + grader?: number | null; + /** + * ID of the page view during the event if it exists. + */ + page_view?: string | null; + /** + * ID of the student associated with the event. will match the user_id in the associated submission. + */ + student?: number | null; +} | null; + +export type Grader = { + /** + * the assignment groups for all submissions in this response that were graded by this user. The details are not nested inside here, but the fact that an assignment is present here means that the grader did grade submissions for this assignment on the contextual date. You can use the id of a grader and of an assignment to make another API call to find all submissions for a grader/assignment combination on a given date. + */ + assignments?: Array | null; + /** + * the user_id of the user who graded the contained submissions + */ + id?: number; + /** + * the name of the user who graded the contained submissions + */ + name?: string | null; +}; + +export type GradingPeriod = { + /** + * Grades can only be changed before the close date of the grading period. + */ + close_date?: string | null; + /** + * The end date of the grading period. + */ + end_date?: string | null; + /** + * The unique identifier for the grading period. + */ + id?: number; + /** + * If true, the grading period's close_date has passed. + */ + is_closed?: boolean | null; + /** + * The start date of the grading period. + */ + start_date?: string | null; + /** + * The title for the grading period. + */ + title?: string | null; + /** + * A weight value that contributes to the overall weight of a grading period set which is used to calculate how much assignments in this period contribute to the total grade. + */ + weight?: number | null; +}; + +export type GradingRules = { + /** + * Number of highest scores to be dropped for each user. + */ + drop_highest?: number | null; + /** + * Number of lowest scores to be dropped for each user. + */ + drop_lowest?: number | null; + /** + * Assignment IDs that should never be dropped. + */ + never_drop?: Array | null; +} | null; + +export type GradingSchemeEntry = { + /** + * The name for an entry value within a GradingStandard that describes the range of the value + */ + name?: string | null; + /** + * The value for the name of the entry within a GradingStandard. The entry represents the lower bound of the range for the entry. This range includes the value up to the next entry in the GradingStandard, or 100 if there is no upper bound. The lowest value will have a lower bound range of 0. + */ + value?: number | null; +}; + +export type GradingStandard = { + /** + * the id for the context either the Account or Course id + */ + context_id?: number | null; + /** + * the context this standard is associated with, either 'Account' or 'Course' + */ + context_type?: string | null; + /** + * A list of GradingSchemeEntry that make up the Grading Standard as an array of values with the scheme name and value + */ + grading_scheme?: Array | null; + /** + * the id of the grading standard + */ + id?: number; + /** + * the title of the grading standard + */ + title?: string | null; +}; + +export type Group = { + /** + * The url of the group's avatar + */ + avatar_url?: string | null; + /** + * The course or account that the group belongs to. The pattern here is that whatever the context_type is, there will be an _id field named after that type. So if instead context_type was 'account', the course_id field would be replaced by an account_id field. + */ + context_type?: string | null; + course_id?: number | null; + /** + * A description of the group. This is plain text. + */ + description?: string | null; + /** + * Whether or not the current user is following this group. + */ + followed_by_user?: boolean | null; + /** + * The ID of the group's category. + */ + group_category_id?: number | null; + /** + * The ID of the group. + */ + id?: number; + /** + * Whether or not the group is public. Currently only community groups can be made public. Also, once a group has been set to public, it cannot be changed back to private. + */ + is_public?: boolean | null; + /** + * How people are allowed to join the group. For all groups except for community groups, the user must share the group's parent course or account. For student organized or community groups, where a user can be a member of as many or few as they want, the applicable levels are 'parent_context_auto_join', 'parent_context_request', and 'invitation_only'. For class groups, where students are divided up and should only be part of one group of the category, this value will always be 'invitation_only', and is not relevant. * If 'parent_context_auto_join', anyone can join and will be automatically accepted. * If 'parent_context_request', anyone can request to join, which must be approved by a group moderator. * If 'invitation_only', only those how have received an invitation my join the group, by accepting that invitation. + */ + join_level?: string | null; + /** + * The number of members currently in the group + */ + members_count?: number | null; + /** + * The display name of the group. + */ + name?: string | null; + /** + * optional: the permissions the user has for the group. returned only for a single group and include[]=permissions + */ + permissions?: { + [key: string]: unknown; + } | null; + /** + * Certain types of groups have special role designations. Currently, these include: 'communities', 'student_organized', and 'imported'. Regular course/account groups have a role of null. + */ + role?: string | null; + /** + * The SIS ID of the group. Only included if the user has permission to view SIS information. + */ + sis_group_id?: string | null; + /** + * The id of the SIS import if created through SIS. Only included if the user has permission to manage SIS information. + */ + sis_import_id?: number | null; + /** + * the storage quota for the group, in megabytes + */ + storage_quota_mb?: number | null; +}; + +export type GroupCategory = { + account_id?: number | null; + /** + * Gives instructors the ability to automatically have group leaders assigned. Values include 'random', 'first', and null; 'random' picks a student from the group at random as the leader, 'first' sets the first student to be assigned to the group as the leader + */ + auto_leader?: string | null; + /** + * The course or account that the category group belongs to. The pattern here is that whatever the context_type is, there will be an _id field named after that type. So if instead context_type was 'Course', the course_id field would be replaced by an course_id field. + */ + context_type?: string | null; + /** + * If self-signup is enabled, group_limit can be set to cap the number of users in each group. If null, there is no limit. + */ + group_limit?: number | null; + /** + * The ID of the group category. + */ + id?: number; + /** + * The display name of the group category. + */ + name?: string | null; + progress?: ProgressNullable; + /** + * Certain types of group categories have special role designations. Currently, these include: 'communities', 'student_organized', and 'imported'. Regular course/account group categories have a role of null. + */ + role?: string | null; + /** + * If the group category allows users to join a group themselves, thought they may only be a member of one group per group category at a time. Values include 'restricted', 'enabled', and null 'enabled' allows students to assign themselves to a group 'restricted' restricts them to only joining a group in their section null disallows students from joining groups + */ + self_signup?: string | null; + /** + * The SIS identifier for the group category. This field is only included if the user has permission to manage or view SIS information. + */ + sis_group_category_id?: string | null; + /** + * The unique identifier for the SIS import. This field is only included if the user has permission to manage SIS information. + */ + sis_import_id?: number | null; +}; + +export type GroupMembership = { + /** + * The id of the group object to which the membership belongs + */ + group_id?: number | null; + /** + * The id of the membership object + */ + id?: number; + /** + * optional: whether or not the record was just created on a create call (POST), i.e. was the user just added to the group, or was the user already a member + */ + just_created?: boolean | null; + /** + * Whether or not the user is a moderator of the group (the must also be an active member of the group to moderate) + */ + moderator?: boolean | null; + /** + * The id of the SIS import if created through SIS. Only included if the user has permission to manage SIS information. + */ + sis_import_id?: number | null; + /** + * The id of the user object to which the membership belongs + */ + user_id?: number | null; + /** + * The current state of the membership. Current possible values are 'accepted', 'invited', and 'requested' + */ + workflow_state?: string | null; +}; + +export type HelpLink = { + /** + * The roles that have access to this help link + */ + available_to?: Array | null; + /** + * The ID of the help link + */ + id?: string; + /** + * The description of the help link + */ + subtext?: string | null; + /** + * The name of the help link + */ + text?: string | null; + /** + * The type of the help link + */ + type?: 'default' | 'custom'; + /** + * The URL of the help link + */ + url?: string | null; +}; + +export type HelpLinks = { + /** + * Help links defined by the account. Could include default help links. + */ + custom_help_links?: Array | null; + /** + * Default help links provided when account has not set help links of their own. + */ + default_help_links?: Array | null; + /** + * Help link button icon + */ + help_link_icon?: string | null; + /** + * Help link button title + */ + help_link_name?: string | null; +}; + +export type Jwt = { + /** + * The signed, encrypted, base64 encoded JWT + */ + token?: string | null; +}; + +export type License = { + /** + * a short string identifying the license + */ + id?: string; + /** + * the name of the license + */ + name?: string | null; + /** + * a link to the license text + */ + url?: string | null; +}; + +export type LockInfo = { + /** + * Asset string for the object causing the lock + */ + asset_string?: string | null; + /** + * (Optional) Context module causing the lock. + */ + context_module?: string | null; + /** + * (Optional) Time at which this was/will be locked. Must be after the due date. + */ + lock_at?: string | null; + manually_locked?: boolean | null; + /** + * (Optional) Time at which this was/will be unlocked. Must be before the due date. + */ + unlock_at?: string | null; +} | null; + +/** + * A Canvas assignment + */ +export type LtiAssignment = { + course_id?: number | null; + description?: string | null; + /** + * The due date for the assignment. If a user id is supplied and an assignment override is in place this field will reflect the due date as it applies to the user. + */ + due_at?: string | null; + id?: number; + lti_course_id?: string | null; + lti_id?: string | null; + name?: string | null; + points_possible?: number | null; +}; + +export type MediaComment = { + 'content-type'?: string | null; + display_name?: string | null; + media_id?: string | null; + media_type?: string | null; + url?: string | null; +} | null; + +export type MigrationIssue = { + /** + * API url to the content migration + */ + content_migration_url?: string | null; + /** + * timestamp + */ + created_at?: string | null; + /** + * Description of the issue for the end-user + */ + description?: string | null; + /** + * Site administrator error message (If the requesting user has permissions) + */ + error_message?: string | null; + /** + * Link to a Canvas error report if present (If the requesting user has permissions) + */ + error_report_html_url?: string | null; + /** + * HTML Url to the Canvas page to investigate the issue + */ + fix_issue_html_url?: string | null; + /** + * the unique identifier for the issue + */ + id?: number; + /** + * Severity of the issue: todo, warning, error + */ + issue_type?: string | null; + /** + * timestamp + */ + updated_at?: string | null; + /** + * Current state of the issue: active, resolved + */ + workflow_state?: string | null; +}; + +export type Migrator = { + /** + * Description of the package type expected + */ + name?: string | null; + /** + * A list of fields this system requires + */ + required_settings?: Array | null; + /** + * Whether this endpoint requires a file upload + */ + requires_file_upload?: boolean | null; + /** + * The value to pass to the create endpoint + */ + type?: string | null; +}; + +export type Module = { + /** + * the date the calling user completed the module (Optional; present only if the caller is a student or if the optional parameter 'student_id' is included) + */ + completed_at?: string | null; + /** + * the unique identifier for the module + */ + id?: number; + /** + * The contents of this module, as an array of Module Items. (Present only if requested via include[]=items AND the module is not deemed too large by Canvas.) + */ + items?: Array | null; + /** + * The number of items in the module + */ + items_count?: number | null; + /** + * The API URL to retrive this module's items + */ + items_url?: string | null; + /** + * the name of this module + */ + name?: string | null; + /** + * the position of this module in the course (1-based) + */ + position?: number | null; + /** + * IDs of Modules that must be completed before this one is unlocked + */ + prerequisite_module_ids?: Array | null; + /** + * if the student's final grade for the course should be published to the SIS upon completion of this module + */ + publish_final_grade?: boolean | null; + /** + * (Optional) Whether this module is published. This field is present only if the caller has permission to view unpublished modules. + */ + published?: boolean | null; + /** + * Whether module items must be unlocked in order + */ + require_sequential_progress?: boolean | null; + /** + * The state of this Module for the calling user one of 'locked', 'unlocked', 'started', 'completed' (Optional; present only if the caller is a student or if the optional parameter 'student_id' is included) + */ + state?: string | null; + /** + * (Optional) the date this module will unlock + */ + unlock_at?: string | null; + /** + * the state of the module: 'active', 'deleted' + */ + workflow_state?: string | null; +}; + +export type ModuleItem = { + completion_requirement?: CompletionRequirement; + content_details?: ContentDetails; + /** + * the id of the object referred to applies to 'File', 'Discussion', 'Assignment', 'Quiz', 'ExternalTool' types + */ + content_id?: number | null; + /** + * (only for 'ExternalUrl' and 'ExternalTool' types) external url that the item points to + */ + external_url?: string | null; + /** + * link to the item in Canvas + */ + html_url?: string | null; + /** + * the unique identifier for the module item + */ + id?: number; + /** + * 0-based indent level; module items may be indented to show a hierarchy + */ + indent?: number | null; + /** + * the id of the Module this item appears in + */ + module_id?: number | null; + /** + * (only for 'ExternalTool' type) whether the external tool opens in a new tab + */ + new_tab?: boolean | null; + /** + * (only for 'Page' type) unique locator for the linked wiki page + */ + page_url?: string | null; + /** + * the position of this item in the module (1-based) + */ + position?: number | null; + /** + * (Optional) Whether this module item is published. This field is present only if the caller has permission to view unpublished items. + */ + published?: boolean | null; + /** + * the title of this item + */ + title?: string | null; + /** + * the type of object referred to one of 'File', 'Page', 'Discussion', 'Assignment', 'Quiz', 'SubHeader', 'ExternalUrl', 'ExternalTool' + */ + type?: string | null; + /** + * (Optional) link to the Canvas API object, if applicable + */ + url?: string | null; +}; + +export type ModuleItemNullable = { + completion_requirement?: CompletionRequirement; + content_details?: ContentDetails; + /** + * the id of the object referred to applies to 'File', 'Discussion', 'Assignment', 'Quiz', 'ExternalTool' types + */ + content_id?: number | null; + /** + * (only for 'ExternalUrl' and 'ExternalTool' types) external url that the item points to + */ + external_url?: string | null; + /** + * link to the item in Canvas + */ + html_url?: string | null; + /** + * the unique identifier for the module item + */ + id?: number; + /** + * 0-based indent level; module items may be indented to show a hierarchy + */ + indent?: number | null; + /** + * the id of the Module this item appears in + */ + module_id?: number | null; + /** + * (only for 'ExternalTool' type) whether the external tool opens in a new tab + */ + new_tab?: boolean | null; + /** + * (only for 'Page' type) unique locator for the linked wiki page + */ + page_url?: string | null; + /** + * the position of this item in the module (1-based) + */ + position?: number | null; + /** + * (Optional) Whether this module item is published. This field is present only if the caller has permission to view unpublished items. + */ + published?: boolean | null; + /** + * the title of this item + */ + title?: string | null; + /** + * the type of object referred to one of 'File', 'Page', 'Discussion', 'Assignment', 'Quiz', 'SubHeader', 'ExternalUrl', 'ExternalTool' + */ + type?: string | null; + /** + * (Optional) link to the Canvas API object, if applicable + */ + url?: string | null; +} | null; + +export type ModuleItemSequence = { + /** + * an array containing one ModuleItemSequenceNode for each appearence of the asset in the module sequence (up to 10 total) + */ + items?: Array | null; + /** + * an array containing each Module referenced above + */ + modules?: Array | null; +}; + +export type ModuleItemSequenceNode = { + current?: ModuleItemNullable; + /** + * The conditional release rule for the module item, if applicable + */ + mastery_path?: { + [key: string]: unknown; + } | null; + next?: ModuleItemNullable; + prev?: ModuleItemNullable; +}; + +/** + * Used by Assignment model + */ +export type NeedsGradingCount = { + /** + * Number of submissions that need grading + */ + needs_grading_count?: number | null; + /** + * The section ID + */ + section_id?: string | null; +}; + +export type NotificationPreference = { + /** + * The category of that notification + */ + category?: string | null; + /** + * How often to send notifications to this communication channel for the given notification. Possible values are 'immediately', 'daily', 'weekly', and 'never' + */ + frequency?: string | null; + href?: string | null; + /** + * The notification this preference belongs to + */ + notification?: string | null; +}; + +export type OriginalityReport = { + /** + * The id of the file receiving the originality score + */ + file_id?: number | null; + /** + * The id of the OriginalityReport + */ + id?: number; + /** + * The ID of the file within Canvas containing the originality report document (if provided) + */ + originality_report_file_id?: number | null; + /** + * A non-LTI launch URL where the originality score of the file may be found. + */ + originality_report_url?: string | null; + /** + * A number between 0 and 100 representing the originality score + */ + originality_score?: number | null; + tool_setting?: ToolSetting; +}; + +export type Outcome = { + /** + * whether this outcome has been used to assess a student + */ + assessed?: boolean | null; + /** + * this defines the variable value used by the calculation_method. included only if calculation_method uses it + */ + calculation_int?: number | null; + /** + * the method used to calculate a students score + */ + calculation_method?: string | null; + /** + * whether the current user can update the outcome + */ + can_edit?: boolean | null; + /** + * whether the outcome can be unlinked + */ + can_unlink?: boolean | null; + /** + * the context owning the outcome. may be null for global outcomes + */ + context_id?: number | null; + context_type?: string | null; + /** + * description of the outcome. omitted in the abbreviated form. + */ + description?: string | null; + /** + * Optional friendly name for reporting + */ + display_name?: string | null; + /** + * whether updates to this outcome will propagate to unassessed rubrics that have imported it + */ + has_updateable_rubrics?: boolean | null; + /** + * the ID of the outcome + */ + id?: number; + /** + * points necessary to demonstrate mastery outcomes. included only if the outcome embeds a rubric criterion. omitted in the abbreviated form. + */ + mastery_points?: number | null; + /** + * maximum points possible. included only if the outcome embeds a rubric criterion. omitted in the abbreviated form. + */ + points_possible?: number | null; + /** + * possible ratings for this outcome. included only if the outcome embeds a rubric criterion. omitted in the abbreviated form. + */ + ratings?: Array | null; + /** + * title of the outcome + */ + title?: string | null; + /** + * the URL for fetching/updating the outcome. should be treated as opaque + */ + url?: string | null; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string | null; +}; + +export type OutcomeNullable = { + /** + * whether this outcome has been used to assess a student + */ + assessed?: boolean | null; + /** + * this defines the variable value used by the calculation_method. included only if calculation_method uses it + */ + calculation_int?: number | null; + /** + * the method used to calculate a students score + */ + calculation_method?: string | null; + /** + * whether the current user can update the outcome + */ + can_edit?: boolean | null; + /** + * whether the outcome can be unlinked + */ + can_unlink?: boolean | null; + /** + * the context owning the outcome. may be null for global outcomes + */ + context_id?: number | null; + context_type?: string | null; + /** + * description of the outcome. omitted in the abbreviated form. + */ + description?: string | null; + /** + * Optional friendly name for reporting + */ + display_name?: string | null; + /** + * whether updates to this outcome will propagate to unassessed rubrics that have imported it + */ + has_updateable_rubrics?: boolean | null; + /** + * the ID of the outcome + */ + id?: number; + /** + * points necessary to demonstrate mastery outcomes. included only if the outcome embeds a rubric criterion. omitted in the abbreviated form. + */ + mastery_points?: number | null; + /** + * maximum points possible. included only if the outcome embeds a rubric criterion. omitted in the abbreviated form. + */ + points_possible?: number | null; + /** + * possible ratings for this outcome. included only if the outcome embeds a rubric criterion. omitted in the abbreviated form. + */ + ratings?: Array | null; + /** + * title of the outcome + */ + title?: string | null; + /** + * the URL for fetching/updating the outcome. should be treated as opaque + */ + url?: string | null; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string | null; +} | null; + +export type OutcomeAlignment = { + /** + * the id of the aligned assignment. + */ + assignment_id?: number | null; + /** + * the id of the aligned learning outcome. + */ + id?: number; + /** + * a string representing the different submission types of an aligned assignment. + */ + submission_types?: string | null; + /** + * the title of the aligned assignment. + */ + title?: string | null; + /** + * the URL for the aligned assignment. + */ + url?: string | null; +}; + +export type OutcomeGroup = { + /** + * whether the current user can update the outcome group + */ + can_edit?: boolean | null; + /** + * the context owning the outcome group. may be null for global outcome groups. omitted in the abbreviated form. + */ + context_id?: number | null; + context_type?: string | null; + /** + * description of the outcome group. omitted in the abbreviated form. + */ + description?: string | null; + /** + * the ID of the outcome group + */ + id?: number; + /** + * the URL for importing another group into this outcome group. should be treated as opaque. omitted in the abbreviated form. + */ + import_url?: string | null; + /** + * the URL for listing/creating outcome links under the outcome group. should be treated as opaque + */ + outcomes_url?: string | null; + parent_outcome_group?: OutcomeGroupNullable; + /** + * the URL for listing/creating subgroups under the outcome group. should be treated as opaque + */ + subgroups_url?: string | null; + /** + * title of the outcome group + */ + title?: string | null; + /** + * the URL for fetching/updating the outcome group. should be treated as opaque + */ + url?: string | null; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string | null; +}; + +export type OutcomeGroupNullable = { + /** + * whether the current user can update the outcome group + */ + can_edit?: boolean | null; + /** + * the context owning the outcome group. may be null for global outcome groups. omitted in the abbreviated form. + */ + context_id?: number | null; + context_type?: string | null; + /** + * description of the outcome group. omitted in the abbreviated form. + */ + description?: string | null; + /** + * the ID of the outcome group + */ + id?: number; + /** + * the URL for importing another group into this outcome group. should be treated as opaque. omitted in the abbreviated form. + */ + import_url?: string | null; + /** + * the URL for listing/creating outcome links under the outcome group. should be treated as opaque + */ + outcomes_url?: string | null; + parent_outcome_group?: OutcomeGroupNullable; + /** + * the URL for listing/creating subgroups under the outcome group. should be treated as opaque + */ + subgroups_url?: string | null; + /** + * title of the outcome group + */ + title?: string | null; + /** + * the URL for fetching/updating the outcome group. should be treated as opaque + */ + url?: string | null; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string | null; +} | null; + +export type OutcomeImport = { + /** + * The date the outcome import was created. + */ + created_at?: string | null; + data?: OutcomeImportData; + /** + * The date the outcome import finished. Returns null if not finished. + */ + ended_at?: string | null; + /** + * The unique identifier for the outcome import. + */ + id?: number; + /** + * An array of row number / error message pairs. Returns the first 25 errors. + */ + processing_errors?: Array> | null; + /** + * The progress of the outcome import. + */ + progress?: string | null; + /** + * The date the outcome import was last updated. + */ + updated_at?: string | null; + user?: UserNullable; + /** + * The current state of the outcome import. + * - 'created': The outcome import has been created. + * - 'importing': The outcome import is currently processing. + * - 'succeeded': The outcome import has completed successfully. + * - 'failed': The outcome import failed. + */ + workflow_state?: string | null; +}; + +export type OutcomeImportData = { + /** + * The type of outcome import + */ + import_type?: string | null; +} | null; + +export type OutcomeLink = { + /** + * whether this outcome has been used to assess a student in the context of this outcome link. In other words, this will be set to true if the context is a course, and a student has been assessed with this outcome in that course. + */ + assessed?: boolean | null; + /** + * whether this outcome link is manageable and is not the last link to an aligned outcome + */ + can_unlink?: boolean | null; + /** + * the context owning the outcome link. will match the context owning the outcome group containing the outcome link; included for convenience. may be null for links in global outcome groups. + */ + context_id?: number | null; + context_type?: string | null; + outcome?: OutcomeNullable; + outcome_group?: OutcomeGroupNullable; + /** + * the URL for fetching/updating the outcome link. should be treated as opaque + */ + url?: string | null; +}; + +/** + * A student's result for an outcome + */ +export type OutcomeResult = { + /** + * A unique identifier for this result + */ + id?: number; + /** + * True if the outcome been mastered + */ + mastery?: boolean; + /** + * The student's score + */ + score?: number; + /** + * total possible points for the score + */ + possible?: number; + /** + * The datetime the resulting OutcomeResult was submitted at, or absent that, when it was assessed. + */ + submitted_or_assessed_at?: string; + /** + * Unique identifiers of objects associated with this result + */ + links?: { + [key: string]: unknown; + }; + /** + * score's percent of maximum points possible for outcome, scaled to reflect any custom mastery levels that differ from the learning outcome + */ + percent?: number; + hidden?: boolean; + hide_points?: boolean; +}; + +/** + * Assessment Outcome Results and optional info (enabled via the "include" parameter on the request) + */ +export type OutcomeResultResponse = { + /** + * Specific outcome results for each assessment + */ + outcome_results?: Array; + linked?: { + /** + * Alignments related to the outcome results (optionally included) + */ + alignments?: Array | null; + /** + * Outcomes related to the outcome results (optionally included) + */ + outcomes?: Array | null; + /** + * Outcome Groups related to the outcome results (optionally included) + */ + outcome_groups?: Array | null; + /** + * Outcome Links related to the outcome results (optionally included) + */ + outcome_links?: Array | null; + /** + * Outcome Paths related to the outcome results (optionally included) + */ + outcome_paths?: Array; + /** + * Users related to the outcome results (optionally included) + */ + users?: Array; + } | null; +}; + +export type OutcomeRollupScoreLinks = { + /** + * The id of the related outcome + */ + outcome?: number; +}; + +export type OutcomeRollupScore = { + /** + * The rollup score for the outcome, based on the student alignment scores related to the outcome. This could be null if the student has no related scores. + */ + score?: number; + /** + * The number of alignment scores included in this rollup. + */ + count?: number; + links?: OutcomeRollupScoreLinks; +}; + +export type OutcomeRollupLinks = { + /** + * If an aggregate result was requested, the course field will be present. Otherwise, the user and section field will be present (Optional) The id of the course that this rollup applies to + */ + course?: number; + /** + * (Optional) The id of the user that this rollup applies to + */ + user?: number; + /** + * (Optional) The id of the section the user is in + */ + section?: number; +}; + +export type OutcomeRollup = { + scores?: Array; + links?: OutcomeRollupLinks; +}; + +/** + * Assessment Outcome Rollup Results and optional info (enabled via the "include" parameter on the request) + */ +export type OutcomeRollupResponse = { + /** + * Outcome rollups + */ + rollups?: Array; + linked?: { + /** + * Courses related to the rollup (optionally included) + */ + courses?: Array | null; + /** + * Outcomes related to the rollup (optionally included) + */ + outcomes?: Array | null; + /** + * Outcome Groups related to the rollup (optionally included) + */ + outcome_groups?: Array | null; + /** + * Outcome Links related to the rollup (optionally included) + */ + outcome_links?: Array | null; + /** + * Outcome Paths related to the rollup (optionally included) + */ + outcome_paths?: Array; + /** + * Users related to the rollup (optionally included) + */ + users?: Array; + } | null; +}; + +/** + * The full path to an outcome + */ +export type OutcomePath = { + /** + * A unique identifier for this outcome + */ + id?: number; + parts?: OutcomePathPart; +}; + +/** + * An outcome or outcome group + */ +export type OutcomePathPart = { + /** + * The title of the outcome or outcome group + */ + name?: string; +}; + +export type Page = { + /** + * the page content, in HTML (present when requesting a single page; omitted when listing pages) + */ + body?: string | null; + /** + * the creation date for the page + */ + created_at?: string | null; + /** + * roles allowed to edit the page; comma-separated list comprising a combination of 'teachers', 'students', 'members', and/or 'public' if not supplied, course defaults are used + */ + editing_roles?: string | null; + /** + * whether this page is the front page for the wiki + */ + front_page?: boolean | null; + /** + * (DEPRECATED) whether this page is hidden from students (note: this is always reflected as the inverse of the published value) + */ + hide_from_students?: boolean | null; + last_edited_by?: UserNullable; + /** + * (Optional) An explanation of why this is locked for the user. Present when locked_for_user is true. + */ + lock_explanation?: string | null; + lock_info?: LockInfo; + /** + * Whether or not this is locked for the user. + */ + locked_for_user?: boolean | null; + /** + * whether the page is published (true) or draft state (false). + */ + published?: boolean | null; + /** + * the title of the page + */ + title?: string | null; + /** + * the date the page was last updated + */ + updated_at?: string | null; + /** + * the unique locator for the page + */ + url?: string | null; +}; + +export type PageRevision = { + /** + * the historic page contents + */ + body?: string | null; + edited_by?: UserNullable; + /** + * whether this is the latest revision or not + */ + latest?: boolean | null; + /** + * an identifier for this revision of the page + */ + revision_id?: number | null; + /** + * the historic page title + */ + title?: string | null; + /** + * the time when this revision was saved + */ + updated_at?: string | null; + /** + * the following fields are not included in the index action and may be omitted from the show action via summary=1 the historic url of the page + */ + url?: string | null; +}; + +/** + * The record of a user page view access in Canvas + */ +export type PageView = { + /** + * The rails action that handled the request + */ + action?: string | null; + /** + * If the request is from an API request, the app that generated the access token + */ + app_name?: string | null; + /** + * The type of asset in the context for the request, if any + */ + asset_type?: string | null; + /** + * The type of context for the request + */ + context_type?: string | null; + /** + * This field is deprecated, and will always be false + */ + contributed?: boolean | null; + /** + * The rails controller that handled the request + */ + controller?: string | null; + /** + * When the request was made + */ + created_at?: string | null; + /** + * The HTTP method such as GET or POST + */ + http_method?: string | null; + /** + * A UUID representing the page view. This is also the unique request id + */ + id: string; + /** + * An approximation of how long the user spent on the page, in seconds + */ + interaction_seconds?: number | null; + links?: PageViewLinks; + /** + * True if the request counted as participating, such as submitting homework + */ + participated?: boolean | null; + /** + * The origin IP address of the request + */ + remote_ip?: string | null; + /** + * How long the response took to render, in seconds + */ + render_time?: number | null; + /** + * The URL requested + */ + url?: string | null; + /** + * The user-agent of the browser or program that made the request + */ + user_agent?: string | null; + /** + * A flag indicating whether the request was user-initiated, or automatic (such as an AJAX call) + */ + user_request?: boolean | null; +}; + +/** + * The links of a page view access in Canvas + */ +export type PageViewLinks = { + /** + * The ID of the account context for this page view + */ + account?: number | null; + /** + * The ID of the asset for the request, if any + */ + asset?: number | null; + /** + * The ID of the context for the request (course id if context_type is Course, etc) + */ + context?: number | null; + /** + * The ID of the actual user who made this request, if the request was made by a user who was masquerading + */ + real_user?: number | null; + /** + * The ID of the user for this page view + */ + user?: number | null; +} | null; + +export type PeerReview = { + /** + * The User object for the assessor if the user include parameter is provided (see user API) (optional) + */ + assessor?: string | null; + /** + * The assessors user id + */ + assessor_id?: number | null; + /** + * The id for the asset associated with this Peer Review + */ + asset_id?: number | null; + /** + * The type of the asset + */ + asset_type?: string | null; + /** + * The id of the Peer Review + */ + id?: number; + /** + * The submission comments associated with this Peer Review if the submission_comment include parameter is provided (see submissions API) (optional) + */ + submission_comments?: string | null; + /** + * the User object for the owner of the asset if the user include parameter is provided (see user API) (optional) + */ + user?: string | null; + /** + * The user id for the owner of the asset + */ + user_id?: number | null; + /** + * The state of the Peer Review, either 'assigned' or 'completed' + */ + workflow_state?: string | null; +}; + +export type Permission = { + add_course_template?: boolean | null; + add_designer_to_course?: boolean | null; + add_observer_to_course?: boolean | null; + add_student_to_course?: boolean | null; + add_ta_to_course?: boolean | null; + add_teacher_to_course?: boolean | null; + allow_course_admin_actions?: boolean | null; + become_user?: boolean | null; + change_course_state?: boolean | null; + create_accounts?: boolean | null; + create_collaborations?: boolean | null; + create_conferences?: boolean | null; + create_forum?: boolean | null; + create_tool_manually?: boolean | null; + delete?: boolean | null; + delete_course_template?: boolean | null; + direct_share?: boolean | null; + edit_course_template?: boolean | null; + generate_observer_pairing_code?: boolean | null; + import_outcomes?: boolean | null; + import_sis?: boolean | null; + lti_add_edit?: boolean | null; + manage?: boolean | null; + manage_account_banks?: boolean | null; + manage_account_calendar_events?: boolean | null; + manage_account_calendar_visibility?: boolean | null; + manage_account_memberships?: boolean | null; + manage_account_settings?: boolean | null; + manage_admin_users?: boolean | null; + manage_alerts?: boolean | null; + manage_assignments?: boolean | null; + manage_assignments_add?: boolean | null; + manage_assignments_delete?: boolean | null; + manage_assignments_edit?: boolean | null; + manage_calendar?: boolean | null; + manage_canvasnet_courses?: boolean | null; + manage_catalog?: boolean | null; + manage_content?: boolean | null; + manage_course_content_add?: boolean | null; + manage_course_content_delete?: boolean | null; + manage_course_content_edit?: boolean | null; + manage_course_visibility?: boolean | null; + manage_courses?: boolean | null; + manage_courses_add?: boolean | null; + manage_courses_admin?: boolean | null; + manage_courses_conclude?: boolean | null; + manage_courses_delete?: boolean | null; + manage_courses_publish?: boolean | null; + manage_courses_reset?: boolean | null; + manage_data_services?: boolean | null; + manage_demos?: boolean | null; + manage_developer_keys?: boolean | null; + manage_feature_flags?: boolean | null; + manage_files_add?: boolean | null; + manage_files_delete?: boolean | null; + manage_files_edit?: boolean | null; + manage_frozen_assignments?: boolean | null; + manage_global_outcomes?: boolean | null; + manage_grades?: boolean | null; + manage_groups?: boolean | null; + manage_groups_add?: boolean | null; + manage_groups_delete?: boolean | null; + manage_groups_manage?: boolean | null; + manage_interaction_alerts?: boolean | null; + manage_internal_analytics?: boolean | null; + manage_internal_settings?: boolean | null; + manage_jobs?: boolean | null; + manage_links?: boolean | null; + manage_lti_add?: boolean | null; + manage_lti_delete?: boolean | null; + manage_lti_edit?: boolean | null; + manage_master_courses?: boolean | null; + manage_outcomes?: boolean | null; + manage_proficiency_calculations?: boolean | null; + manage_proficiency_scales?: boolean | null; + manage_release_notes?: boolean | null; + manage_role_overrides?: boolean | null; + manage_rubrics?: boolean | null; + manage_sections_add?: boolean | null; + manage_sections_delete?: boolean | null; + manage_sections_edit?: boolean | null; + manage_sftp_user_settings?: boolean | null; + manage_sis?: boolean | null; + manage_site_settings?: boolean | null; + manage_storage_quotas?: boolean | null; + manage_students?: boolean | null; + manage_user_logins?: boolean | null; + manage_user_notes?: boolean | null; + manage_user_observers?: boolean | null; + manage_wiki_create?: boolean | null; + manage_wiki_delete?: boolean | null; + manage_wiki_update?: boolean | null; + moderate_forum?: boolean | null; + moderate_user_content?: boolean | null; + participate_as_student?: boolean | null; + post_to_forum?: boolean | null; + provision_catalog?: boolean | null; + proxy_assignment_submission?: boolean | null; + read?: boolean | null; + read_announcements?: boolean | null; + read_as_admin?: boolean | null; + read_as_member?: boolean | null; + read_course_content?: boolean | null; + read_course_list?: boolean | null; + read_email_addresses?: boolean | null; + read_files?: boolean | null; + read_forum?: boolean | null; + read_grades?: boolean | null; + read_messages?: boolean | null; + read_outcomes?: boolean | null; + read_prior_roster?: boolean | null; + read_question_banks?: boolean | null; + read_reports?: boolean | null; + read_roster?: boolean | null; + read_rubrics?: boolean | null; + read_sis?: boolean | null; + read_syllabus?: boolean | null; + remove_designer_from_course?: boolean | null; + remove_observer_from_course?: boolean | null; + remove_student_from_course?: boolean | null; + remove_ta_from_course?: boolean | null; + remove_teacher_from_course?: boolean | null; + reset_any_mfa?: boolean | null; + reset_content?: boolean | null; + ruby_profile?: boolean | null; + select_final_grade?: boolean | null; + send_messages?: boolean | null; + send_messages_all?: boolean | null; + suspend_accounts?: boolean | null; + undelete_courses?: boolean | null; + update?: boolean | null; + use_student_view?: boolean | null; + view_all_grades?: boolean | null; + view_analytics?: boolean | null; + view_audit_trail?: boolean | null; + view_course_changes?: boolean | null; + view_error_reports?: boolean | null; + view_feature_flags?: boolean | null; + view_grade_changes?: boolean | null; + view_group_pages?: boolean | null; + view_jobs?: boolean | null; + view_notifications?: boolean | null; + view_quiz_answer_audits?: boolean | null; + view_statistics?: boolean | null; + view_unpublished_items?: boolean | null; + view_user_logins?: boolean | null; +}; + +/** + * A planner note + */ +export type PlannerNote = { + /** + * The course that the note is in relation too, if applicable + */ + course_id?: number | null; + /** + * The description of the planner note + */ + description?: string | null; + /** + * The ID of the planner note + */ + id?: number; + /** + * the Canvas web URL of the linked learning object + */ + linked_object_html_url?: string | null; + /** + * the id of the linked learning object + */ + linked_object_id?: number | null; + /** + * the type of the linked learning object + */ + linked_object_type?: string | null; + /** + * the API URL of the linked learning object + */ + linked_object_url?: string | null; + /** + * The title for a planner note + */ + title?: string | null; + /** + * The datetime of when the planner note should show up on their planner + */ + todo_date?: string | null; + /** + * The id of the associated user creating the planner note + */ + user_id?: number | null; + /** + * The current published state of the planner note + */ + workflow_state?: string | null; +}; + +/** + * User-controlled setting for whether an item should be displayed on the planner or not + */ +export type PlannerOverride = { + /** + * The id of the plannable's associated assignment, if it has one + */ + assignment_id?: number | null; + /** + * The datetime of when the planner override was created + */ + created_at?: string | null; + /** + * The datetime of when the planner override was deleted, if applicable + */ + deleted_at?: string | null; + /** + * Controls whether or not the associated plannable item shows up in the opportunities list + */ + dismissed?: boolean | null; + /** + * The ID of the planner override + */ + id?: number; + /** + * Controls whether or not the associated plannable item is marked complete on the planner + */ + marked_complete?: boolean | null; + /** + * The id of the associated object for the planner override + */ + plannable_id?: number | null; + /** + * The type of the associated object for the planner override + */ + plannable_type?: string | null; + /** + * The datetime of when the planner override was updated + */ + updated_at?: string | null; + /** + * The id of the associated user for the planner override + */ + user_id?: number | null; + /** + * The current published state of the item, synced with the associated object + */ + workflow_state?: string | null; +}; + +export type Poll = { + /** + * The unique identifier for the poll + */ + id?: number; + /** + * The question/title of the poll + */ + question?: string; + /** + * The description of the poll + */ + description?: string; + /** + * The time at which the poll was created + */ + created_at?: string; + /** + * The unique identifier for the user that created the poll + */ + user_id?: number; + /** + * An aggregate of the results of all associated poll sessions, with the poll choice id as the key, and the aggregated submission count as the value. + */ + total_results?: { + [key: string]: unknown; + }; +}; + +export type Proficiency = { + /** + * An array of proficiency ratings. See the ProficiencyRating specification above. + */ + ratings?: Array<{ + [key: string]: unknown; + }> | null; +}; + +/** + * Profile details for a Canvas user. + */ +export type Profile = { + /** + * The avatar_url can change over time, so we recommend not caching it for more than a few hours + */ + avatar_url?: string | null; + bio?: string | null; + calendar?: CalendarLink; + /** + * This field is not in the Canvas API specification + */ + effective_locale?: string | null; + /** + * The ID of the user. + */ + id?: number; + /** + * The integration_id associated with the user. + */ + integration_id?: string | null; + /** + * The users locale. + */ + locale?: string | null; + /** + * sample_user@example.com + */ + login_id?: string | null; + lti_user_id?: string | null; + /** + * Sample User + */ + name?: string | null; + /** + * sample_user@example.com + */ + primary_email?: string | null; + /** + * The pronouns set on the profile (as of 12/02/2023 this is not in the API specification, but is returned with a profile call) + */ + pronouns?: string | null; + /** + * Sample User + */ + short_name?: string | null; + /** + * sis1 + */ + sis_user_id?: string | null; + /** + * user, sample + */ + sortable_name?: string | null; + /** + * Optional: This field is only returned in certain API calls, and will return the IANA time zone name of the user's preferred timezone. + */ + time_zone?: string | null; + title?: string | null; +}; + +export type Progress = { + /** + * percent completed + */ + completion?: number | null; + /** + * the context owning the job. + */ + context_id?: number | null; + context_type?: string | null; + /** + * the time the job was created + */ + created_at?: string | null; + /** + * the ID of the Progress object + */ + id?: number; + /** + * optional details about the job + */ + message?: string | null; + /** + * optional results of the job. omitted when job is still pending + */ + results?: { + [key: string]: unknown; + } | null; + /** + * the type of operation + */ + tag?: string | null; + /** + * the time the job was last updated + */ + updated_at?: string | null; + /** + * url where a progress update can be retrieved + */ + url?: string | null; + /** + * the id of the user who started the job + */ + user_id?: number | null; + /** + * the state of the job one of 'queued', 'running', 'completed', 'failed' + */ + workflow_state?: string | null; +}; + +export type ProgressNullable = { + /** + * percent completed + */ + completion?: number | null; + /** + * the context owning the job. + */ + context_id?: number | null; + context_type?: string | null; + /** + * the time the job was created + */ + created_at?: string | null; + /** + * the ID of the Progress object + */ + id?: number; + /** + * optional details about the job + */ + message?: string | null; + /** + * optional results of the job. omitted when job is still pending + */ + results?: { + [key: string]: unknown; + } | null; + /** + * the type of operation + */ + tag?: string | null; + /** + * the time the job was last updated + */ + updated_at?: string | null; + /** + * url where a progress update can be retrieved + */ + url?: string | null; + /** + * the id of the user who started the job + */ + user_id?: number | null; + /** + * the state of the job one of 'queued', 'running', 'completed', 'failed' + */ + workflow_state?: string | null; +} | null; + +export type ProvisionalGrade = { + /** + * Whether this is the 'final' provisional grade created by the moderator + */ + final?: boolean | null; + /** + * The grade + */ + grade?: string | null; + /** + * Whether the grade was applied to the most current submission (false if the student resubmitted after grading) + */ + grade_matches_current_submission?: boolean | null; + /** + * When the grade was given + */ + graded_at?: string | null; + /** + * The identifier for the provisional grade + */ + provisional_grade_id?: number | null; + /** + * The numeric score + */ + score?: number | null; + /** + * A link to view this provisional grade in SpeedGrader + */ + speedgrader_url?: string | null; +}; + +export type Quiz = { + /** + * access code to restrict quiz access + */ + access_code?: string | null; + /** + * list of due dates for the quiz + */ + all_dates?: Array | null; + /** + * how many times a student can take the quiz -1 = unlimited attempts + */ + allowed_attempts?: number | null; + /** + * Whether survey submissions will be kept anonymous (only applicable to 'graded_survey', 'survey' quiz types) + */ + anonymous_submissions?: boolean | null; + /** + * the ID of the quiz's assignment group: + */ + assignment_group_id?: number | null; + /** + * lock questions after answering? only valid if one_question_at_a_time=true + */ + cant_go_back?: boolean | null; + /** + * the description of the quiz + */ + description?: string | null; + /** + * when the quiz is due + */ + due_at?: string | null; + /** + * prevent the students from seeing correct answers after the specified date has passed. only valid if show_correct_answers=true + */ + hide_correct_answers_at?: string | null; + /** + * let students see their quiz responses? possible values: null, 'always', 'until_after_last_attempt' + */ + hide_results?: string | null; + /** + * the HTTP/HTTPS URL to the quiz + */ + html_url?: string | null; + /** + * the ID of the quiz + */ + id?: number; + /** + * IP address or range that quiz access is limited to + */ + ip_filter?: string | null; + /** + * when to lock the quiz + */ + lock_at?: string | null; + /** + * (Optional) An explanation of why this is locked for the user. Present when locked_for_user is true. + */ + lock_explanation?: string | null; + lock_info?: LockInfo; + /** + * Whether or not this is locked for the user. + */ + locked_for_user?: boolean | null; + /** + * a url suitable for loading the quiz in a mobile webview. it will persiste the headless session and, for quizzes in public courses, will force the user to login + */ + mobile_url?: string | null; + /** + * show one question at a time? + */ + one_question_at_a_time?: boolean | null; + /** + * prevent the students from seeing their results more than once (right after they submit the quiz) + */ + one_time_results?: boolean | null; + permissions?: QuizPermissions; + /** + * The total point value given to the quiz + */ + points_possible?: number | null; + /** + * A url that can be visited in the browser with a POST request to preview a quiz as the teacher. Only present when the user may grade + */ + preview_url?: string | null; + /** + * whether the quiz has a published or unpublished draft state. + */ + published?: boolean | null; + /** + * the number of questions in the quiz + */ + question_count?: number | null; + /** + * List of question types in the quiz + */ + question_types?: Array | null; + /** + * Link to endpoint to send extensions for this quiz. + */ + quiz_extensions_url?: string | null; + /** + * type of quiz possible values: 'practice_quiz', 'assignment', 'graded_survey', 'survey' + */ + quiz_type?: string | null; + /** + * which quiz score to keep (only if allowed_attempts != 1) possible values: 'keep_highest', 'keep_latest' + */ + scoring_policy?: string | null; + /** + * show which answers were correct when results are shown? only valid if hide_results=null + */ + show_correct_answers?: boolean | null; + /** + * when should the correct answers be visible by students? only valid if show_correct_answers=true + */ + show_correct_answers_at?: string | null; + /** + * restrict the show_correct_answers option above to apply only to the last submitted attempt of a quiz that allows multiple attempts. only valid if show_correct_answers=true and allowed_attempts > 1 + */ + show_correct_answers_last_attempt?: boolean | null; + /** + * shuffle answers for students? + */ + shuffle_answers?: boolean | null; + /** + * Link to Speed Grader for this quiz. Will not be present if quiz is unpublished + */ + speedgrader_url?: string | null; + /** + * quiz time limit in minutes + */ + time_limit?: number | null; + /** + * the title of the quiz + */ + title?: string | null; + /** + * when to unlock the quiz + */ + unlock_at?: string | null; + /** + * Whether the assignment's 'published' state can be changed to false. Will be false if there are student submissions for the quiz. + */ + unpublishable?: boolean | null; + /** + * Current version number of the quiz + */ + version_number?: number | null; +}; + +/** + * Set of assignment-overridden dates for a quiz. + */ +export type QuizAssignmentOverride = { + /** + * If this property is present, it means that dates in this structure are not based on an assignment override, but are instead for all students. + */ + base?: boolean | null; + /** + * The date after which any quiz submission is considered late. + */ + due_at?: string | null; + /** + * ID of the assignment override, unless this is the base construct, in which case the 'id' field is omitted. + */ + id?: number; + /** + * When the quiz will stop being available for taking. A value of null means it can always be taken. + */ + lock_at?: string | null; + /** + * Title of the section this assignment override is for, if any. + */ + title?: string | null; + /** + * Date when the quiz becomes available for taking. + */ + unlock_at?: string | null; +} | null; + +/** + * Set of assignment-overridden dates for a quiz. + */ +export type QuizAssignmentOverrideSet = { + all_dates?: QuizAssignmentOverride; + due_dates?: QuizAssignmentOverride; + /** + * ID of the quiz those dates are for. + */ + quiz_id?: string | null; +}; + +/** + * Container for set of assignment-overridden dates for a quiz. + */ +export type QuizAssignmentOverrideSetContainer = { + /** + * The QuizAssignmentOverrideSet + */ + quiz_assignment_overrides?: Array | null; +}; + +export type QuizGroup = { + /** + * The ID of the Assessment question bank to pull questions from. + */ + assessment_question_bank_id?: number | null; + /** + * The ID of the question group. + */ + id: number; + /** + * The name of the question group. + */ + name?: string | null; + /** + * The number of questions to pick from the group to display to the student. + */ + pick_count?: number | null; + /** + * The order in which the question group will be retrieved and displayed. + */ + position?: number | null; + /** + * The amount of points allotted to each question in the group. + */ + question_points?: number | null; + /** + * The ID of the Quiz the question group belongs to. + */ + quiz_id: number; +}; + +/** + * Permissions the user has for the quiz + */ +export type QuizPermissions = { + /** + * whether the user may create a new quiz + */ + create?: boolean | null; + /** + * whether the user may edit, update, or delete the quiz + */ + manage?: boolean | null; + /** + * whether the user can view the quiz + */ + read?: boolean | null; + /** + * whether the user may view quiz statistics for this quiz + */ + read_statistics?: boolean | null; + /** + * whether the user may review grades for all quiz submissions for this quiz + */ + review_grades?: boolean | null; + /** + * whether the user may submit a submission for the quiz + */ + submit?: boolean | null; + /** + * whether the user may update the quiz + */ + update?: boolean | null; +} | null; + +export type QuizQuestion = { + /** + * An array of available answers to display to the student. + */ + answers?: Array | null; + /** + * The comments to display if the student answers the question correctly. + */ + correct_comments?: string | null; + /** + * The ID of the quiz question. + */ + id: number; + /** + * The comments to display if the student answers incorrectly. + */ + incorrect_comments?: string | null; + /** + * The comments to display regardless of how the student answered. + */ + neutral_comments?: string | null; + /** + * The maximum amount of points possible received for getting this question correct. + */ + points_possible?: number | null; + /** + * The order in which the question will be retrieved and displayed. + */ + position?: number | null; + /** + * The name of the question. + */ + question_name?: string | null; + /** + * The text of the question. + */ + question_text?: string | null; + /** + * The type of the question. + */ + question_type?: string | null; + /** + * The ID of the Quiz the question belongs to. + */ + quiz_id: number; +}; + +export type QuizReport = { + /** + * boolean indicating whether the report is for an anonymous survey. if true, no student names will be included in the csv + */ + anonymous?: boolean | null; + /** + * when the report was created + */ + created_at?: string | null; + file?: FileNullable; + /** + * boolean indicating whether the report can be generated, which is true unless the quiz is a survey one + */ + generatable?: boolean | null; + /** + * the ID of the quiz report + */ + id?: number; + /** + * boolean indicating whether the report represents all submissions or only the most recent ones for each student + */ + includes_all_versions?: boolean | null; + progress?: ProgressNullable; + /** + * if the report has not yet finished generating, a URL where information about its progress can be retrieved. refer to the Progress API for more information (Note: not available in JSON-API format) + */ + progress_url?: string | null; + /** + * the ID of the quiz + */ + quiz_id?: number; + /** + * a human-readable (and localized) version of the report_type + */ + readable_type?: string | null; + /** + * which type of report this is possible values: 'student_analysis', 'item_analysis' + */ + report_type?: string | null; + /** + * when the report was last updated + */ + updated_at?: string | null; + /** + * the API endpoint for this report + */ + url?: string | null; +}; + +export type QuizSubmission = { + /** + * For quizzes that allow multiple attempts, this field specifies the quiz submission attempt number. + */ + attempt?: number | null; + /** + * The time at which the quiz submission will be overdue, and be flagged as a late submission. + */ + end_at?: string | null; + /** + * Number of times the student was allowed to re-take the quiz over the multiple-attempt limit. + */ + extra_attempts?: number | null; + /** + * Amount of extra time allowed for the quiz submission, in minutes. + */ + extra_time?: number | null; + /** + * The time at which the student submitted the quiz submission. + */ + finished_at?: string | null; + /** + * Number of points the quiz submission's score was fudged by. + */ + fudge_points?: number | null; + /** + * Whether the student has viewed their results to the quiz. + */ + has_seen_results?: boolean | null; + /** + * The ID of the quiz submission. + */ + id: number; + /** + * For quizzes that allow multiple attempts, this is the score that will be used, which might be the score of the latest, or the highest, quiz submission. + */ + kept_score?: number | null; + /** + * The student can take the quiz even if it's locked for everyone else + */ + manually_unlocked?: boolean | null; + /** + * Indicates whether the quiz submission is overdue and needs submission + */ + overdue_and_needs_submission?: boolean | null; + /** + * The ID of the Quiz the quiz submission belongs to. + */ + quiz_id: number; + /** + * The score of the quiz submission, if graded. + */ + score?: number | null; + /** + * The original score of the quiz submission prior to any re-grading. + */ + score_before_regrade?: number | null; + /** + * The time at which the student started the quiz submission. + */ + started_at?: string | null; + /** + * The ID of the Submission the quiz submission represents. + */ + submission_id?: number | null; + /** + * Amount of time spent, in seconds. + */ + time_spent?: number | null; + /** + * The ID of the Student that made the quiz submission. + */ + user_id?: number | null; + /** + * The current state of the quiz submission. Possible values: ['untaken'|'pending_review'|'complete'|'settings_only'|'preview']. + */ + workflow_state?: string | null; +}; + +export type QuizSubmissionQuestion = { + /** + * The provided answer (if any) for this question. The format of this parameter depends on the type of the question, see the Appendix for more information. + */ + answer?: string | null; + /** + * The possible answers for this question when those possible answers are necessary. The presence of this parameter is dependent on permissions. + */ + answers?: Array | null; + /** + * Whether this question is flagged. + */ + flagged?: boolean | null; + /** + * The ID of the QuizQuestion this answer is for. + */ + id: number; +}; + +export type Report = { + attachment?: FileNullable; + /** + * The date and time the report was created. + */ + created_at?: string | null; + /** + * This is the current line count being written to the report. It updates every 1000 records. + */ + current_line?: number | null; + /** + * The date and time the report finished processing. + */ + ended_at?: string | null; + /** + * The url to the report download. + */ + file_url?: string | null; + /** + * The unique identifier for the report. + */ + id?: number; + parameters?: ReportParameters; + /** + * The progress of the report + */ + progress?: number | null; + /** + * The type of report. + */ + report?: string | null; + /** + * The date and time the report started processing. + */ + started_at?: string | null; + /** + * The status of the report + */ + status?: string | null; +}; + +/** + * The parameters returned will vary for each report. + */ +export type ReportParameters = { + /** + * If true, account data will be included. If false, account data will be omitted. + */ + accounts?: boolean | null; + /** + * The id of the course to report on + */ + course_id?: number | null; + /** + * If true, course data will be included. If false, course data will be omitted. + */ + courses?: boolean | null; + /** + * The end date for submissions. Max time range is 2 weeks. + */ + end_at?: string | null; + /** + * Include enrollment state. Defaults to 'all' Options: ['active'| 'invited'| 'creation_pending'| 'deleted'| 'rejected'| 'completed'| 'inactive'| 'all'] + */ + enrollment_state?: Array | null; + /** + * The canvas id of the term to get grades from + */ + enrollment_term_id?: number | null; + /** + * If true, enrollment data will be included. If false, enrollment data will be omitted. + */ + enrollments?: boolean | null; + /** + * If true, group data will be included. If false, group data will be omitted. + */ + groups?: boolean | null; + /** + * If true, deleted objects will be included. If false, deleted objects will be omitted. + */ + include_deleted?: boolean | null; + /** + * If true, enrollment state will be included. If false, enrollment state will be omitted. Defaults to false. + */ + include_enrollment_state?: boolean | null; + /** + * The sort order for the csv, Options: 'users', 'courses', 'outcomes'. + */ + order?: string | null; + /** + * If true, section data will be included. If false, section data will be omitted. + */ + sections?: boolean | null; + sis_accounts_csv?: number | null; + sis_terms_csv?: number | null; + /** + * The beginning date for submissions. Max time range is 2 weeks. + */ + start_at?: string | null; + /** + * If true, term data will be included. If false, term data will be omitted. + */ + terms?: boolean | null; + /** + * If true, user data will be included. If false, user data will be omitted. + */ + users?: boolean | null; + /** + * If true, data for crosslisted courses will be included. If false, data for crosslisted courses will be omitted. + */ + xlist?: boolean | null; +} | null; + +export type Role = { + /** + * JSON representation of the account the role is in. + */ + account?: { + [key: string]: unknown; + } | null; + /** + * The role type that is being used as a base for this role. For account-level roles, this is 'AccountMembership'. For course-level roles, it is an enrollment type. + */ + base_role_type?: string | null; + /** + * The label of the role. + */ + label?: string | null; + /** + * A dictionary of permissions keyed by name (see permissions input parameter in the 'Create a role' API). + */ + permissions?: { + [key: string]: unknown; + } | null; + /** + * The label of the role. (Deprecated alias for 'label') + */ + role?: string | null; + /** + * The state of the role: 'active', 'inactive', or 'built_in' + */ + workflow_state?: string | null; +}; + +export type Rubric = { + /** + * If an assessment type is included in the 'include' parameter, includes an array of rubric assessment objects for a given rubric, based on the assessment type requested. If the user does not request an assessment type this key will be absent. + */ + assessments?: Array | null; + /** + * the context owning the rubric + */ + context_id?: number | null; + context_type?: string | null; + /** + * whether or not free-form comments are used + */ + free_form_criterion_comments?: boolean | null; + hide_score_total?: boolean | null; + /** + * the ID of the rubric + */ + id?: number; + points_possible?: number | null; + read_only?: boolean | null; + reusable?: boolean | null; + /** + * title of the rubric + */ + title?: string | null; +}; + +export type RubricAssessment = { + /** + * the current number of attempts made on the object of the assessment + */ + artifact_attempt?: number | null; + /** + * the id of the object of the assessment + */ + artifact_id?: number | null; + /** + * the object of the assessment + */ + artifact_type?: string | null; + /** + * the type of assessment. values will be either 'grading', 'peer_review', or 'provisional_grade' + */ + assessment_type?: string | null; + /** + * user id of the person who made the assessment + */ + assessor_id?: number | null; + /** + * (Optional) If 'comments_only' is included in the 'style' parameter, returned assessments will include only the comments portion of their data hash. If the user does not request a style, this key will be absent. + */ + comments?: Array | null; + /** + * (Optional) If 'full' is included in the 'style' parameter, returned assessments will have their full details contained in their data hash. If the user does not request a style, this key will be absent. + */ + data?: Array<{ + [key: string]: unknown; + }> | null; + /** + * the ID of the rubric + */ + id?: number; + rubric_association_id?: number | null; + /** + * the rubric the assessment belongs to + */ + rubric_id?: number | null; + score?: number | null; +}; + +export type RubricCriteria = { + criterion_use_range?: boolean | null; + description?: string | null; + /** + * The id of rubric criteria. + */ + id?: string; + /** + * (Optional) The id of the learning outcome this criteria uses, if any. + */ + learning_outcome_id?: string | null; + long_description?: string | null; + points?: number | null; + ratings?: Array | null; + /** + * (Optional) The 3rd party vendor's GUID for the outcome this criteria references, if any. + */ + vendor_guid?: string | null; +}; + +export type RubricRating = { + description?: string | null; + id?: string; + long_description?: string | null; + points?: number | null; +}; + +export type RubricSettings = { + id?: number | null; + title?: string | null; + points_possible?: number | null; + free_form_criterion_comments?: boolean | null; + hide_score_total?: boolean | null; + hide_points?: boolean | null; +} | null; + +/** + * Settings that are applicable across an account's authentication configuration, even if there are multiple individual providers + */ +export type SsoSettings = { + /** + * If a discovery url is set, canvas will forward all users to that URL when they need to be authenticated. That page will need to then help the user figure out where they need to go to log in. If no discovery url is configured, the first configuration will be used to attempt to authenticate the user. + */ + auth_discovery_url?: string | null; + /** + * The url to redirect users to for password resets. Leave blank for default Canvas behavior + */ + change_password_url?: string | null; + /** + * The label used for unique login identifiers. + */ + login_handle_name?: string | null; + /** + * If an unknown user url is set, Canvas will forward to that url when a service authenticates a user, but that user does not exist in Canvas. The default behavior is to present an error. + */ + unknown_user_url?: string | null; +}; + +export type Scope = { + /** + * The controller action the scope is associated to + */ + action?: string | null; + /** + * The controller the scope is associated to + */ + controller?: string | null; + /** + * The resource the scope is associated with + */ + resource?: string | null; + /** + * The localized resource name + */ + resource_name?: string | null; + /** + * The identifier for the scope + */ + scope?: string | null; + /** + * The HTTP verb for the scope + */ + verb?: string | null; +}; + +export type Section = { + /** + * The unique Canvas identifier for the course in which the section belongs + */ + course_id?: number | null; + /** + * the end date for the section, if applicable + */ + end_at?: string | null; + /** + * The unique identifier for the section. + */ + id?: number; + /** + * Optional: The integration ID of the section. This field is only included if the user has permission to view SIS information. + */ + integration_id?: string | null; + /** + * The name of the section. + */ + name?: string | null; + /** + * The unique identifier of the original course of a cross-listed section + */ + nonxlist_course_id?: number | null; + /** + * Restrict user enrollments to the start and end dates of the section + */ + restrict_enrollments_to_section_dates?: boolean | null; + /** + * The unique SIS identifier for the course in which the section belongs. This field is only included if the user has permission to view SIS information. + */ + sis_course_id?: string | null; + /** + * The unique identifier for the SIS import if created through SIS. This field is only included if the user has permission to manage SIS information. + */ + sis_import_id?: number | null; + /** + * The sis id of the section. This field is only included if the user has permission to view SIS information. + */ + sis_section_id?: string | null; + /** + * the start date for the section, if applicable + */ + start_at?: string | null; + /** + * optional array of students for the section, if include=['students'] is set and applicable + */ + students?: Array | null; + /** + * optional: the total number of active and invited students in the section + */ + total_students?: number | null; +}; + +export type SharedBrandConfig = { + /** + * The id of the account it should be shared within. + */ + account_id?: string | null; + /** + * The md5 (since BrandConfigs are identified by MD5 and not numeric id) of the BrandConfig to share. + */ + brand_config_md5?: string | null; + /** + * When this was created + */ + created_at?: string | null; + /** + * The shared_brand_config identifier. + */ + id?: number; + /** + * The name to share this theme as + */ + name?: string | null; + /** + * When this was last updated + */ + updated_at?: string | null; +}; + +export type SisImport = { + /** + * Whether stickiness was added to the batch changes. + */ + add_sis_stickiness?: boolean | null; + /** + * Whether the import was run in batch mode. + */ + batch_mode?: boolean | null; + /** + * The term the batch was limited to. + */ + batch_mode_term_id?: string | null; + /** + * Whether stickiness was cleared. + */ + clear_sis_stickiness?: boolean | null; + /** + * The date the SIS import was created. + */ + created_at?: string | null; + /** + * An array of CSV files for processing + */ + csv_attachments?: Array> | null; + data?: SisImportData; + /** + * The ID of the SIS Import that this import was diffed against + */ + diffed_against_import_id?: number | null; + /** + * The identifier of the data set that this SIS batch diffs against + */ + diffing_data_set_identifier?: string | null; + /** + * The date the SIS import finished. Returns null if not finished. + */ + ended_at?: string | null; + errors_attachment?: FileNullable; + /** + * The unique identifier for the SIS import. + */ + id?: number; + /** + * Enables batch mode against all terms in term file. Requires change_threshold to be set. + */ + multi_term_batch_mode?: boolean | null; + /** + * Whether UI changes were overridden. + */ + override_sis_stickiness?: boolean | null; + /** + * An array of CSV_file/error_message pairs. + */ + processing_errors?: Array> | null; + /** + * Only imports that are complete will get this data. An array of CSV_file/warning_message pairs. + */ + processing_warnings?: Array> | null; + /** + * The progress of the SIS import. The progress will reset when using batch_mode and have a different progress for the cleanup stage + */ + progress?: string | null; + /** + * When set the import will skip any deletes. + */ + skip_deletes?: boolean | null; + /** + * The date the SIS import was last updated. + */ + updated_at?: string | null; + user?: UserNullable; + /** + * The current state of the SIS import. + * - 'created': The SIS import has been created. + * - 'importing': The SIS import is currently processing. + * - 'cleanup_batch': The SIS import is currently cleaning up courses, sections, and enrollments not included in the batch for batch_mode imports. + * - 'imported': The SIS import has completed successfully. + * - 'imported_with_messages': The SIS import completed with errors or warnings. + * - 'aborted': The SIS import was aborted. + * - 'failed_with_messages': The SIS import failed with errors. + * - 'failed': The SIS import failed. + */ + workflow_state?: string | null; +}; + +export type SisImportCounts = { + abstract_courses?: number | null; + accounts?: number | null; + /** + * the number of courses that were removed because they were not included in the batch for batch_mode imports. Only included if courses were deleted + */ + batch_courses_deleted?: number | null; + /** + * the number of enrollments that were removed because they were not included in the batch for batch_mode imports. Only included if enrollments were deleted + */ + batch_enrollments_deleted?: number | null; + /** + * the number of sections that were removed because they were not included in the batch for batch_mode imports. Only included if sections were deleted + */ + batch_sections_deleted?: number | null; + courses?: number | null; + enrollments?: number | null; + error_count?: number | null; + grade_publishing_results?: number | null; + group_memberships?: number | null; + groups?: number | null; + sections?: number | null; + terms?: number | null; + users?: number | null; + warning_count?: number | null; + xlists?: number | null; +} | null; + +export type SisImportData = { + counts?: SisImportCounts; + /** + * The type of SIS import + */ + import_type?: string | null; + /** + * Which files were included in the SIS import + */ + supplied_batches?: Array | null; +} | null; + +export type SisImportError = { + /** + * The file where the error message occurred. + */ + file?: string | null; + /** + * The error message that from the record. + */ + message?: string | null; + /** + * The line number where the error occurred. Some Importers do not yet support this. This is a 1 based index starting with the header row. + */ + row?: number | null; + /** + * The unique identifier for the SIS import. + */ + sis_import_id?: number | null; +}; + +export type Submission = { + /** + * A unique short ID identifying this submission without reference to the owning user. Only included if the caller has administrator access for the current account. + */ + anonymous_id?: string | null; + assignment?: AssignmentNullable; + /** + * The submission's assignment id + */ + assignment_id?: number | null; + /** + * Whether the assignment is visible to the user who submitted the assignment. Submissions where `assignment_visible` is false no longer count towards the student's grade and the assignment can no longer be accessed by the student. `assignment_visible` becomes false for submissions that do not have a grade and whose assignment is no longer assigned to the student's section. + */ + assignment_visible?: boolean | null; + /** + * This is the submission attempt number. + */ + attempt?: number | null; + /** + * The content of the submission, if it was submitted directly in a text field. + */ + body?: string | null; + /** + * The submission's course (see the course API) (optional) + */ + course?: string | null; + /** + * Whether the assignment is excused. Excused assignments have no impact on a user's grade. + */ + excused?: boolean | null; + /** + * Extra submission attempts allowed fro the given user and assignment. + */ + extra_attempts?: number | null; + /** + * The grade for the submission, translated into the assignment grading scheme (so a letter grade, for example). + */ + grade?: string | null; + /** + * A boolean flag which is false if the student has re-submitted since the submission was last graded. + */ + grade_matches_current_submission?: boolean | null; + graded_at?: string | null; + /** + * The id of the user who graded the submission. This will be null for submissions that haven't been graded yet. It will be a positive number if a real user has graded the submission and a negative number if the submission was graded by a process (e.g. Quiz autograder and autograding LTI tools). Specifically autograded quizzes set grader_id to the negative of the quiz id. Submissions autograded by LTI tools set grader_id to the negative of the tool id. + */ + grader_id?: number | null; + /** + * URL to the submission. This will require the user to log in. + */ + html_url?: string | null; + /** + * Whether the submission was made after the applicable due date + */ + late?: boolean | null; + /** + * The status of the submission in relation to the late policy. Can be late, missing, none, or null. + */ + late_policy_status?: string | null; + /** + * Whether the assignment is missing. + */ + missing?: boolean | null; + /** + * The amount of points automatically deducted from the score by the missing/late policy for a late or missing assignment. + */ + points_deducted?: number | null; + /** + * The date this submission was posted to the student, or nil if it has not been posted + */ + posted_at?: string | null; + /** + * URL to the submission preview. This will require the user to log in. + */ + preview_url?: string | null; + /** + * The read status of this submission for the given user (optional). Including read_status will mark submission(s) as read. + */ + read_status?: string | null; + /** + * This indicates whether the submission has been reassigned by the instructor. + */ + redo_request?: boolean | null; + /** + * The raw score + */ + score?: number | null; + /** + * The amount of time, in seconds, that an submission is late by. + */ + seconds_late?: number | null; + /** + * Associated comments for a submission (optional) + */ + submission_comments?: Array | null; + /** + * The types of submission ex: ('online_text_entry'|'online_url'|'online_upload'|'media_recording') + */ + submission_type?: string | null; + /** + * The timestamp when the assignment was submitted + */ + submitted_at?: string | null; + /** + * The URL of the submission (for 'online_url' submissions). + */ + url?: string | null; + /** + * The submissions user (see user API) (optional) + */ + user?: string | null; + /** + * The id of the user who created the submission + */ + user_id?: number | null; + /** + * The current state of the submission + */ + workflow_state?: string | null; +}; + +export type SubmissionNullable = { + /** + * A unique short ID identifying this submission without reference to the owning user. Only included if the caller has administrator access for the current account. + */ + anonymous_id?: string | null; + assignment?: AssignmentNullable; + /** + * The submission's assignment id + */ + assignment_id?: number | null; + /** + * Whether the assignment is visible to the user who submitted the assignment. Submissions where `assignment_visible` is false no longer count towards the student's grade and the assignment can no longer be accessed by the student. `assignment_visible` becomes false for submissions that do not have a grade and whose assignment is no longer assigned to the student's section. + */ + assignment_visible?: boolean | null; + /** + * This is the submission attempt number. + */ + attempt?: number | null; + /** + * The content of the submission, if it was submitted directly in a text field. + */ + body?: string | null; + /** + * The submission's course (see the course API) (optional) + */ + course?: string | null; + /** + * Whether the assignment is excused. Excused assignments have no impact on a user's grade. + */ + excused?: boolean | null; + /** + * Extra submission attempts allowed fro the given user and assingment. + */ + extra_attempts?: number | null; + /** + * The grade for the submission, translated into the assignment grading scheme (so a letter grade, for example). + */ + grade?: string | null; + /** + * A boolean flag which is false if the student has re-submitted since the submission was last graded. + */ + grade_matches_current_submission?: boolean | null; + graded_at?: string | null; + /** + * The id of the user who graded the submission. This will be null for submissions that haven't been graded yet. It will be a positive number if a real user has graded the submission and a negative number if the submission was graded by a process (e.g. Quiz autograder and autograding LTI tools). Specifically autograded quizzes set grader_id to the negative of the quiz id. Submissions autograded by LTI tools set grader_id to the negative of the tool id. + */ + grader_id?: number | null; + /** + * URL to the submission. This will require the user to log in. + */ + html_url?: string | null; + /** + * Whether the submission was made after the applicable due date + */ + late?: boolean | null; + /** + * The status of the submission in relation to the late policy. Can be late, missing, none, or null. + */ + late_policy_status?: string | null; + /** + * Whether the assignment is missing. + */ + missing?: boolean | null; + /** + * The amount of points automatically deducted from the score by the missing/late policy for a late or missing assignment. + */ + points_deducted?: number | null; + /** + * The date this submission was posted to the student, or nil if it has not been posted + */ + posted_at?: string | null; + /** + * URL to the submission preview. This will require the user to log in. + */ + preview_url?: string | null; + /** + * The read status of this submission for the given user (optional). Including read_status will mark submission(s) as read. + */ + read_status?: string | null; + /** + * This indicates whether the submission has been reassigned by the instructor. + */ + redo_request?: boolean | null; + /** + * The raw score + */ + score?: number | null; + /** + * The amount of time, in seconds, that an submission is late by. + */ + seconds_late?: number | null; + /** + * Associated comments for a submission (optional) + */ + submission_comments?: Array | null; + /** + * The types of submission ex: ('online_text_entry'|'online_url'|'online_upload'|'media_recording') + */ + submission_type?: string | null; + /** + * The timestamp when the assignment was submitted + */ + submitted_at?: string | null; + /** + * The URL of the submission (for 'online_url' submissions). + */ + url?: string | null; + /** + * The submissions user (see user API) (optional) + */ + user?: string | null; + /** + * The id of the user who created the submission + */ + user_id?: number | null; + /** + * The current state of the submission + */ + workflow_state?: string | null; +} | null; + +export type SubmissionComment = { + author?: UserDisplay; + author_id?: number | null; + author_name?: string | null; + comment?: string | null; + created_at?: string | null; + edited_at?: string | null; + id?: number; + media_comment?: MediaComment; +}; + +export type SubmissionHistory = { + /** + * the id of the submission + */ + submission_id?: number | null; + /** + * an array of all the versions of this submission + */ + versions?: Array | null; +}; + +/** + * A SubmissionVersion object contains all the fields that a Submission object does, plus additional fields prefixed with current_* new_* and previous_* described below. + */ +export type SubmissionVersion = { + /** + * the id of the assignment this submissions is for + */ + assignment_id?: number | null; + /** + * the name of the assignment this submission is for + */ + assignment_name?: string | null; + /** + * the body text of the submission + */ + body?: string | null; + /** + * the most up to date grade for the current version of this submission + */ + current_grade?: string | null; + /** + * the latest time stamp for the grading of this submission + */ + current_graded_at?: string | null; + /** + * the name of the most recent grader for this submission + */ + current_grader?: string | null; + /** + * boolean indicating whether the grade is equal to the current submission grade + */ + grade_matches_current_submission?: boolean | null; + /** + * time stamp for the grading of this version of the submission + */ + graded_at?: string | null; + /** + * the name of the user who graded this version of the submission + */ + grader?: string | null; + /** + * the user id of the user who graded this version of the submission + */ + grader_id?: number | null; + /** + * the id of the submission of which this is a version + */ + id?: number; + /** + * the updated grade provided in this version of the submission + */ + new_grade?: string | null; + /** + * the timestamp for the grading of this version of the submission (alias for graded_at) + */ + new_graded_at?: string | null; + /** + * alias for 'grader' + */ + new_grader?: string | null; + /** + * the grade for the submission version immediately preceding this one + */ + previous_grade?: string | null; + /** + * the timestamp for the grading of the submission version immediately preceding this one + */ + previous_graded_at?: string | null; + /** + * the name of the grader who graded the version of this submission immediately preceding this one + */ + previous_grader?: string | null; + /** + * the score for this version of the submission + */ + score?: number | null; + /** + * the type of submission + */ + submission_type?: string | null; + /** + * the url of the submission, if there is one + */ + url?: string | null; + /** + * the user ID of the student who created this submission + */ + user_id?: number | null; + /** + * the name of the student who created this submission + */ + user_name?: string | null; + /** + * the state of the submission at this version + */ + workflow_state?: string | null; +}; + +export type SuccessTrue = { + success?: boolean | null; +}; + +export type Tab = { + /** + * only included if true + */ + hidden?: boolean | null; + html_url?: string | null; + id?: string; + label?: string | null; + /** + * 1 based + */ + position?: number | null; + type?: string | null; + /** + * possible values are: public, members, admins, and none + */ + visibility?: string | null; +}; + +export type Term = { + end_at?: string | null; + id?: number; + name?: string | null; + start_at?: string | null; +} | null; + +export type TermsOfService = { + /** + * The id of the root account that owns the Terms of Service + */ + account_id?: number | null; + /** + * Content of the Terms of Service + */ + content?: string | null; + /** + * Terms Of Service id + */ + id?: number; + /** + * Boolean dictating if the user must accept Terms of Service + */ + passive?: boolean | null; + /** + * The given type for the Terms of Service + */ + terms_type?: 'default' | 'custom' | 'no_terms'; +}; + +export type ToolSetting = { + /** + * the resource type code of the resource handler to use to display originality reports + */ + resource_type_code?: string | null; + /** + * a URL that may be used to override the launch URL inferred by the specified resource_type_code. If used a 'resource_type_code' must also be specified. + */ + resource_url?: string | null; +} | null; + +export type TurnitinSettings = { + exclude_biblio?: boolean | null; + exclude_quoted?: boolean | null; + exclude_small_matches_type?: string | null; + exclude_small_matches_value?: number | null; + internet_check?: boolean | null; + journal_check?: boolean | null; + originality_report_visibility?: string | null; + s_paper_check?: boolean | null; +} | null; + +/** + * Describes the copyright and license information for a File + */ +export type UsageRights = { + /** + * List of ids of files that were updated + */ + file_ids?: Array | null; + /** + * Copyright line for the file + */ + legal_copyright?: string | null; + /** + * License identifier for the file. + */ + license?: string | null; + /** + * Readable license name + */ + license_name?: string | null; + /** + * Explanation of the action performed + */ + message?: string | null; + /** + * Justification for using the file in a Canvas course. Valid values are 'own_copyright', 'public_domain', 'used_by_permission', 'fair_use', 'creative_commons' + */ + use_justification?: string | null; +}; + +/** + * A Canvas user, e.g. a student, teacher, administrator, observer, etc. + */ +export type User = { + /** + * Optional If avatars are enabled and caller is admin, this field can be requested and will contain the current state of the user's avatar. + */ + avatar_state?: string | null; + /** + * If avatars are enabled, this field will be included and contain a url to retrieve the user's avatar. + */ + avatar_url?: string | null; + /** + * Optional: The user's bio. + */ + bio?: string | null; + /** + * Optional: This field can be requested with certain API calls, and will return the users primary email address. + */ + email?: string | null; + /** + * Optional: This field can be requested with certain API calls, and will return a list of the users active enrollments. See the List enrollments API for more details about the format of these records. + */ + enrollments?: Array | null; + /** + * The first name of the user. + */ + first_name?: string | null; + /** + * The ID of the user. + */ + id: number; + /** + * The integration_id associated with the user. This field is only included if the user came from a SIS import and has permissions to view SIS information. + */ + integration_id?: string | null; + /** + * Optional: This field is only returned in certain API calls, and will return a timestamp representing the last time the user logged in to canvas. + */ + last_login?: string | null; + /** + * The last name of the user. + */ + last_name?: string | null; + /** + * Optional: This field can be requested with certain API calls, and will return the users locale in RFC 5646 format. + */ + locale?: string | null; + /** + * The unique login id for the user. This is what the user uses to log in to Canvas. + */ + login_id?: string | null; + /** + * The name of the user. + */ + name?: string | null; + /** + * A short name the user has selected, for use in conversations or other less formal places through the site. + */ + short_name?: string | null; + /** + * A list of the sections this user is part of in the courses they are part of. + */ + sections?: string | null; + /** + * The id of the SIS import. This field is only included if the user came from a SIS import and has permissions to manage SIS information. + */ + sis_import_id?: number | null; + /** + * The SIS ID associated with the user. This field is only included if the user came from a SIS import and has permissions to view SIS information. + */ + sis_user_id?: string | null; + /** + * The name of the user that is should be used for sorting groups of users, such as in the gradebook. + */ + sortable_name?: string | null; + /** + * Optional: This field is only returned in certain API calls, and will return the IANA time zone name of the user's preferred timezone. + */ + time_zone?: string | null; +}; + +/** + * A Canvas user, e.g. a student, teacher, administrator, observer, etc. + */ +export type UserNullable = { + /** + * Optional If avatars are enabled and caller is admin, this field can be requested and will contain the current state of the user's avatar. + */ + avatar_state?: string | null; + /** + * If avatars are enabled, this field will be included and contain a url to retrieve the user's avatar. + */ + avatar_url?: string | null; + /** + * Optional: The user's bio. + */ + bio?: string | null; + /** + * Optional: This field can be requested with certain API calls, and will return the users primary email address. + */ + email?: string | null; + /** + * Optional: This field can be requested with certain API calls, and will return a list of the users active enrollments. See the List enrollments API for more details about the format of these records. + */ + enrollments?: Array | null; + /** + * The first name of the user. + */ + first_name?: string | null; + /** + * The ID of the user. + */ + id: number; + /** + * The integration_id associated with the user. This field is only included if the user came from a SIS import and has permissions to view SIS information. + */ + integration_id?: string | null; + /** + * Optional: This field is only returned in certain API calls, and will return a timestamp representing the last time the user logged in to canvas. + */ + last_login?: string | null; + /** + * The last name of the user. + */ + last_name?: string | null; + /** + * Optional: This field can be requested with certain API calls, and will return the users locale in RFC 5646 format. + */ + locale?: string | null; + /** + * The unique login id for the user. This is what the user uses to log in to Canvas. + */ + login_id?: string | null; + /** + * The name of the user. + */ + name?: string | null; + /** + * A short name the user has selected, for use in conversations or other less formal places through the site. + */ + short_name?: string | null; + /** + * A list of the sections this user is part of in the courses they are part of. + */ + sections?: string | null; + /** + * The id of the SIS import. This field is only included if the user came from a SIS import and has permissions to manage SIS information. + */ + sis_import_id?: number | null; + /** + * The SIS ID associated with the user. This field is only included if the user came from a SIS import and has permissions to view SIS information. + */ + sis_user_id?: string | null; + /** + * The name of the user that is should be used for sorting groups of users, such as in the gradebook. + */ + sortable_name?: string | null; + /** + * Optional: This field is only returned in certain API calls, and will return the IANA time zone name of the user's preferred timezone. + */ + time_zone?: string | null; +} | null; + +/** + * Abbreviated user object UserDisplay (see users API). + */ +export type UserDisplay = { + id?: number | null; + anonymous_id?: string | null; + display_name?: string | null; + avatar_image_url?: string | null; + /** + * The pronouns set on the profile (as of 12/02/2023 this is not in the API specification, but is returned with a profile call) + */ + pronouns?: string | null; +} | null; + +/** + * Canvas user data provided in a section via include=['students'] + */ +export type UserSectionInclude = { + /** + * The time at which this user was originally created + */ + created_at?: string | null; + /** + * The ID of the user. + */ + id: number; + /** + * The integration_id associated with the user. This field is only included if the user came from a SIS import and has permissions to view SIS information. + */ + integration_id?: string | null; + /** + * The unique login id for the user. This is what the user uses to log in to Canvas. + */ + login_id?: string | null; + /** + * The name of the user. + */ + name?: string | null; + /** + * A short name the user has selected, for use in conversations or other less formal places through the site. + */ + short_name?: string | null; + /** + * The id of the SIS import. This field is only included if the user came from a SIS import and has permissions to manage SIS information. + */ + sis_import_id?: number | null; + /** + * The SIS ID associated with the user. This field is only included if the user came from a SIS import and has permissions to view SIS information. + */ + sis_user_id?: string | null; + /** + * The name of the user that is should be used for sorting groups of users, such as in the gradebook. + */ + sortable_name?: string | null; +}; + +/** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ +export type PageParam = string; + +/** + * The numbers of items to return. + */ +export type PerPageParam = number; + +export type GetSingleAssignmentLtiData = { + body?: never; + path: { + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * The id of the user. Can be a Canvas or LTI id for the user. + */ + user_id?: string; + }; + url: '/lti/assignments/{assignment_id}'; +}; + +export type GetSingleAssignmentLtiResponses = { + /** + * No response was specified + */ + 200: LtiAssignment; +}; + +export type GetSingleAssignmentLtiResponse = GetSingleAssignmentLtiResponses[keyof GetSingleAssignmentLtiResponses]; + +export type ShowOriginalityReportFilesData = { + body?: never; + path: { + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + file_id: string; + }; + query?: never; + url: '/lti/assignments/{assignment_id}/files/{file_id}/originality_report'; +}; + +export type ShowOriginalityReportFilesResponses = { + /** + * No response was specified + */ + 200: OriginalityReport; +}; + +export type ShowOriginalityReportFilesResponse = ShowOriginalityReportFilesResponses[keyof ShowOriginalityReportFilesResponses]; + +export type EditOriginalityReportFilesData = { + body?: { + /** + * The ID of the file within Canvas that contains the originality + * report for the submitted file provided in the request URL. + */ + 'originality_report[originality_report_file_id]'?: number; + /** + * The URL where the originality report for the specified + * file may be found. + */ + 'originality_report[originality_report_url]'?: string; + /** + * A number between 0 and 100 representing the measure of the + * specified file's originality. + */ + 'originality_report[originality_score]'?: number; + /** + * The resource type code of the resource handler Canvas should use for the + * LTI launch for viewing originality reports. If set Canvas will launch + * to the message with type 'basic-lti-launch-request' in the specified + * resource handler rather than using the originality_report_url. + */ + 'originality_report[tool_setting][resource_type_code]'?: string; + /** + * The URL Canvas should launch to when showing an LTI originality report. + * Note that this value is inferred from the specified resource handler's + * message "path" value (See `resource_type_code`) unless + * it is specified. If this parameter is used a `resource_type_code` + * must also be specified. + */ + 'originality_report[tool_setting][resource_url]'?: string; + /** + * May be set to "pending", "error", or "scored". If an originality score + * is provided a workflow state of "scored" will be inferred. + */ + 'originality_report[workflow_state]'?: string; + }; + path: { + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + file_id: string; + }; + query?: never; + url: '/lti/assignments/{assignment_id}/files/{file_id}/originality_report'; +}; + +export type EditOriginalityReportFilesResponses = { + /** + * No response was specified + */ + 200: OriginalityReport; +}; + +export type EditOriginalityReportFilesResponse = EditOriginalityReportFilesResponses[keyof EditOriginalityReportFilesResponses]; + +export type GetSingleSubmissionData = { + body?: never; + path: { + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + }; + query?: never; + url: '/lti/assignments/{assignment_id}/submissions/{submission_id}'; +}; + +export type GetSingleSubmissionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetHistoryOfSingleSubmissionData = { + body?: never; + path: { + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + }; + query?: never; + url: '/lti/assignments/{assignment_id}/submissions/{submission_id}/history'; +}; + +export type GetHistoryOfSingleSubmissionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateOriginalityReportData = { + body: { + /** + * The id of the file being given an originality score. Required + * if creating a report associated with a file. + */ + 'originality_report[file_id]'?: number; + /** + * The ID of the file within Canvas that contains the originality + * report for the submitted file provided in the request URL. + */ + 'originality_report[originality_report_file_id]'?: number; + /** + * The URL where the originality report for the specified + * file may be found. + */ + 'originality_report[originality_report_url]'?: string; + /** + * A number between 0 and 100 representing the measure of the + * specified file's originality. + */ + 'originality_report[originality_score]': number; + /** + * The resource type code of the resource handler Canvas should use for the + * LTI launch for viewing originality reports. If set Canvas will launch + * to the message with type 'basic-lti-launch-request' in the specified + * resource handler rather than using the originality_report_url. + */ + 'originality_report[tool_setting][resource_type_code]'?: string; + /** + * The URL Canvas should launch to when showing an LTI originality report. + * Note that this value is inferred from the specified resource handler's + * message "path" value (See `resource_type_code`) unless + * it is specified. If this parameter is used a `resource_type_code` + * must also be specified. + */ + 'originality_report[tool_setting][resource_url]'?: string; + /** + * May be set to "pending", "error", or "scored". If an originality score + * is provided a workflow state of "scored" will be inferred. + */ + 'originality_report[workflow_state]'?: string; + }; + path: { + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + }; + query?: never; + url: '/lti/assignments/{assignment_id}/submissions/{submission_id}/originality_report'; +}; + +export type CreateOriginalityReportResponses = { + /** + * No response was specified + */ + 200: OriginalityReport; +}; + +export type CreateOriginalityReportResponse = CreateOriginalityReportResponses[keyof CreateOriginalityReportResponses]; + +export type ShowOriginalityReportSubmissionsData = { + body?: never; + path: { + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/lti/assignments/{assignment_id}/submissions/{submission_id}/originality_report/{id}'; +}; + +export type ShowOriginalityReportSubmissionsResponses = { + /** + * No response was specified + */ + 200: OriginalityReport; +}; + +export type ShowOriginalityReportSubmissionsResponse = ShowOriginalityReportSubmissionsResponses[keyof ShowOriginalityReportSubmissionsResponses]; + +export type EditOriginalityReportSubmissionsData = { + body?: { + /** + * The ID of the file within Canvas that contains the originality + * report for the submitted file provided in the request URL. + */ + 'originality_report[originality_report_file_id]'?: number; + /** + * The URL where the originality report for the specified + * file may be found. + */ + 'originality_report[originality_report_url]'?: string; + /** + * A number between 0 and 100 representing the measure of the + * specified file's originality. + */ + 'originality_report[originality_score]'?: number; + /** + * The resource type code of the resource handler Canvas should use for the + * LTI launch for viewing originality reports. If set Canvas will launch + * to the message with type 'basic-lti-launch-request' in the specified + * resource handler rather than using the originality_report_url. + */ + 'originality_report[tool_setting][resource_type_code]'?: string; + /** + * The URL Canvas should launch to when showing an LTI originality report. + * Note that this value is inferred from the specified resource handler's + * message "path" value (See `resource_type_code`) unless + * it is specified. If this parameter is used a `resource_type_code` + * must also be specified. + */ + 'originality_report[tool_setting][resource_url]'?: string; + /** + * May be set to "pending", "error", or "scored". If an originality score + * is provided a workflow state of "scored" will be inferred. + */ + 'originality_report[workflow_state]'?: string; + }; + path: { + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/lti/assignments/{assignment_id}/submissions/{submission_id}/originality_report/{id}'; +}; + +export type EditOriginalityReportSubmissionsResponses = { + /** + * No response was specified + */ + 200: OriginalityReport; +}; + +export type EditOriginalityReportSubmissionsResponse = EditOriginalityReportSubmissionsResponses[keyof EditOriginalityReportSubmissionsResponses]; + +export type GetAllUsersInGroupLtiData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/lti/groups/{group_id}/users'; +}; + +export type GetAllUsersInGroupLtiResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAllUsersInGroupLtiResponse = GetAllUsersInGroupLtiResponses[keyof GetAllUsersInGroupLtiResponses]; + +export type ListAllWebhookSubscriptionForToolProxyData = { + body?: never; + path?: never; + query?: never; + url: '/lti/subscriptions'; +}; + +export type ListAllWebhookSubscriptionForToolProxyResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateWebhookSubscriptionData = { + body: { + /** + * The id of the context for the subscription. + */ + 'submission[ContextId]': string; + /** + * The type of context for the subscription. Must be 'assignment', + * 'account', or 'course'. + */ + 'subscription[ContextType]': string; + /** + * Array of strings representing the event types for + * the subscription. + */ + 'subscription[EventTypes]': Array; + /** + * Format to deliver the live events. Must be 'live-event' or 'caliper'. + */ + 'subscription[Format]': string; + /** + * An object with a single key: 'Url'. Example: { "Url": "sqs.example" } + */ + 'subscription[TransportMetadata]': { + [key: string]: unknown; + }; + /** + * Must be either 'sqs' or 'https'. + */ + 'subscription[TransportType]': string; + }; + path?: never; + query?: never; + url: '/lti/subscriptions'; +}; + +export type CreateWebhookSubscriptionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteWebhookSubscriptionData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/lti/subscriptions/{id}'; +}; + +export type DeleteWebhookSubscriptionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ShowSingleWebhookSubscriptionData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/lti/subscriptions/{id}'; +}; + +export type ShowSingleWebhookSubscriptionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateWebhookSubscriptionData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/lti/subscriptions/{id}'; +}; + +export type UpdateWebhookSubscriptionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleUserLtiData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/lti/users/{id}'; +}; + +export type GetSingleUserLtiResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type GetSingleUserLtiResponse = GetSingleUserLtiResponses[keyof GetSingleUserLtiResponses]; + +export type RetrieveAssignmentsEnabledForGradeExportToSisAccountsData = { + body?: never; + path: { + /** + * The ID of the account to query. + */ + account_id: number; + }; + query?: { + /** + * The ID of the course to query. + */ + course_id?: number; + /** + * When searching on an account, + */ + starts_before?: string; + /** + * When searching on an account, + */ + ends_after?: string; + /** + * Array of additional + */ + include?: 'student_overrides'; + }; + url: '/sis/accounts/{account_id}/assignments'; +}; + +export type RetrieveAssignmentsEnabledForGradeExportToSisAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RetrieveAssignmentsEnabledForGradeExportToSisCoursesData = { + body?: never; + path: { + /** + * The ID of the course to query. + */ + course_id: number; + }; + query?: { + /** + * The ID of the account to query. + */ + account_id?: number; + /** + * When searching on an account, + */ + starts_before?: string; + /** + * When searching on an account, + */ + ends_after?: string; + /** + * Array of additional + */ + include?: 'student_overrides'; + }; + url: '/sis/courses/{course_id}/assignments'; +}; + +export type RetrieveAssignmentsEnabledForGradeExportToSisCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DisableAssignmentsCurrentlyEnabledForGradeExportToSisData = { + body?: { + /** + * The ID of the grading period. + */ + grading_period_id?: number; + }; + path: { + /** + * The ID of the course. + */ + course_id: number; + }; + query?: never; + url: '/sis/courses/{course_id}/disable_post_to_sis'; +}; + +export type DisableAssignmentsCurrentlyEnabledForGradeExportToSisResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListAccountsData = { + body?: never; + path?: never; + query?: { + /** + * Array of additional information to include. + * + * "lti_guid":: the 'tool_consumer_instance_guid' that will be sent for this account on LTI launches + * "registration_settings":: returns info about the privacy policy and terms of use + * "services":: returns services and whether they are enabled (requires account management permissions) + */ + include?: 'lti_guid' | 'registration_settings' | 'services'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts'; +}; + +export type ListAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAccountsResponse = ListAccountsResponses[keyof ListAccountsResponses]; + +export type SearchAccountDomainsData = { + body?: never; + path?: never; + query?: { + /** + * campus name + */ + name?: string; + /** + * no description + */ + domain?: string; + /** + * no description + */ + latitude?: number; + /** + * no description + */ + longitude?: number; + }; + url: '/v1/accounts/search'; +}; + +export type SearchAccountDomainsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type IndexOfActiveGlobalNotificationForUserData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/account_notifications'; +}; + +export type IndexOfActiveGlobalNotificationForUserResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type IndexOfActiveGlobalNotificationForUserResponse = IndexOfActiveGlobalNotificationForUserResponses[keyof IndexOfActiveGlobalNotificationForUserResponses]; + +export type CreateGlobalNotificationData = { + body: { + /** + * The end date and time of the notification in ISO8601 format. + * e.g. 2014-01-01T01:00Z + */ + 'account_notification[end_at]': string; + /** + * The icon to display with the notification. + * Note: Defaults to warning. + */ + 'account_notification[icon]'?: 'warning' | 'information' | 'question' | 'error' | 'calendar'; + /** + * The message body of the notification. + */ + 'account_notification[message]': string; + /** + * The start date and time of the notification in ISO8601 format. + * e.g. 2014-01-01T01:00Z + */ + 'account_notification[start_at]': string; + /** + * The subject of the notification. + */ + 'account_notification[subject]': string; + /** + * The role(s) to send global notification to. Note: ommitting this field will send to everyone + * Example: + * account_notification_roles: ["StudentEnrollment", "TeacherEnrollment"] + */ + account_notification_roles?: Array; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/account_notifications'; +}; + +export type CreateGlobalNotificationResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CloseNotificationForUserData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/account_notifications/{id}'; +}; + +export type CloseNotificationForUserResponses = { + /** + * No response was specified + */ + 200: AccountNotification; +}; + +export type CloseNotificationForUserResponse = CloseNotificationForUserResponses[keyof CloseNotificationForUserResponses]; + +export type ShowGlobalNotificationData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/account_notifications/{id}'; +}; + +export type ShowGlobalNotificationResponses = { + /** + * No response was specified + */ + 200: AccountNotification; +}; + +export type ShowGlobalNotificationResponse = ShowGlobalNotificationResponses[keyof ShowGlobalNotificationResponses]; + +export type UpdateGlobalNotificationData = { + body?: { + /** + * The end date and time of the notification in ISO8601 format. + * e.g. 2014-01-01T01:00Z + */ + 'account_notification[end_at]'?: string; + /** + * The icon to display with the notification. + */ + 'account_notification[icon]'?: 'warning' | 'information' | 'question' | 'error' | 'calendar'; + /** + * The message body of the notification. + */ + 'account_notification[message]'?: string; + /** + * The start date and time of the notification in ISO8601 format. + * e.g. 2014-01-01T01:00Z + */ + 'account_notification[start_at]'?: string; + /** + * The subject of the notification. + */ + 'account_notification[subject]'?: string; + /** + * The role(s) to send global notification to. Note: ommitting this field will send to everyone + * Example: + * account_notification_roles: ["StudentEnrollment", "TeacherEnrollment"] + */ + account_notification_roles?: Array; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/account_notifications/{id}'; +}; + +export type UpdateGlobalNotificationResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListAccountAdminsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * Scope the results to those with user IDs equal to any of the IDs specified here. + */ + user_id?: string; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/admins'; +}; + +export type ListAccountAdminsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAccountAdminsResponse = ListAccountAdminsResponses[keyof ListAccountAdminsResponses]; + +export type MakeAccountAdminData = { + body: { + /** + * [DEPRECATED] The user's admin relationship with the account will be + * created with the given role. Defaults to 'AccountAdmin'. + */ + role?: string; + /** + * The user's admin relationship with the account will be created with the + * given role. Defaults to the built-in role for 'AccountAdmin'. + */ + role_id?: number; + /** + * Send a notification email to + * the new admin if true. Default is true. + */ + send_confirmation?: boolean; + /** + * The id of the user to promote. + */ + user_id: number; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/admins'; +}; + +export type MakeAccountAdminResponses = { + /** + * No response was specified + */ + 200: Admin; +}; + +export type MakeAccountAdminResponse = MakeAccountAdminResponses[keyof MakeAccountAdminResponses]; + +export type RemoveAccountAdminData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * [DEPRECATED] Account role to remove from the user. Defaults to + * 'AccountAdmin'. Any other account role must be specified explicitly. + */ + role?: string; + /** + * The user's admin relationship with the account will be created with the + * given role. Defaults to the built-in role for 'AccountAdmin'. + */ + role_id?: number; + }; + url: '/v1/accounts/{account_id}/admins/{user_id}'; +}; + +export type RemoveAccountAdminResponses = { + /** + * No response was specified + */ + 200: Admin; +}; + +export type RemoveAccountAdminResponse = RemoveAccountAdminResponses[keyof RemoveAccountAdminResponses]; + +export type GetDepartmentLevelParticipationDataCompletedData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/analytics/completed/activity'; +}; + +export type GetDepartmentLevelParticipationDataCompletedResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetDepartmentLevelGradeDataCompletedData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/analytics/completed/grades'; +}; + +export type GetDepartmentLevelGradeDataCompletedResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetDepartmentLevelStatisticsCompletedData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/analytics/completed/statistics'; +}; + +export type GetDepartmentLevelStatisticsCompletedResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetDepartmentLevelParticipationDataCurrentData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/analytics/current/activity'; +}; + +export type GetDepartmentLevelParticipationDataCurrentResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetDepartmentLevelGradeDataCurrentData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/analytics/current/grades'; +}; + +export type GetDepartmentLevelGradeDataCurrentResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetDepartmentLevelStatisticsCurrentData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/analytics/current/statistics'; +}; + +export type GetDepartmentLevelStatisticsCurrentResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetDepartmentLevelParticipationDataTermsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + term_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/analytics/terms/{term_id}/activity'; +}; + +export type GetDepartmentLevelParticipationDataTermsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetDepartmentLevelGradeDataTermsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + term_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/analytics/terms/{term_id}/grades'; +}; + +export type GetDepartmentLevelGradeDataTermsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetDepartmentLevelStatisticsTermsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + term_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/analytics/terms/{term_id}/statistics'; +}; + +export type GetDepartmentLevelStatisticsTermsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListAuthenticationProvidersData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/authentication_providers'; +}; + +export type ListAuthenticationProvidersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAuthenticationProvidersResponse = ListAuthenticationProvidersResponses[keyof ListAuthenticationProvidersResponses]; + +export type AddAuthenticationProviderData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/authentication_providers'; +}; + +export type AddAuthenticationProviderResponses = { + /** + * No response was specified + */ + 200: AuthenticationProvider; +}; + +export type AddAuthenticationProviderResponse = AddAuthenticationProviderResponses[keyof AddAuthenticationProviderResponses]; + +export type DeleteAuthenticationProviderData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/authentication_providers/{id}'; +}; + +export type DeleteAuthenticationProviderResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetAuthenticationProviderData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/authentication_providers/{id}'; +}; + +export type GetAuthenticationProviderResponses = { + /** + * No response was specified + */ + 200: AuthenticationProvider; +}; + +export type GetAuthenticationProviderResponse = GetAuthenticationProviderResponses[keyof GetAuthenticationProviderResponses]; + +export type UpdateAuthenticationProviderData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/authentication_providers/{id}'; +}; + +export type UpdateAuthenticationProviderResponses = { + /** + * No response was specified + */ + 200: AuthenticationProvider; +}; + +export type UpdateAuthenticationProviderResponse = UpdateAuthenticationProviderResponses[keyof UpdateAuthenticationProviderResponses]; + +export type ListContentMigrationsAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/content_migrations'; +}; + +export type ListContentMigrationsAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListContentMigrationsAccountsResponse = ListContentMigrationsAccountsResponses[keyof ListContentMigrationsAccountsResponses]; + +export type CreateContentMigrationAccountsData = { + body: { + /** + * Move anything scheduled for day 'X' to the specified day. (0-Sunday, + * 1-Monday, 2-Tuesday, 3-Wednesday, 4-Thursday, 5-Friday, 6-Saturday) + */ + 'date_shift_options[day_substitutions][X]'?: number; + /** + * The new end date for the source content/course + */ + 'date_shift_options[new_end_date]'?: string; + /** + * The new start date for the content/course + */ + 'date_shift_options[new_start_date]'?: string; + /** + * The original end date of the source content/course + */ + 'date_shift_options[old_end_date]'?: string; + /** + * The original start date of the source content/course + */ + 'date_shift_options[old_start_date]'?: string; + /** + * Whether to remove dates in the copied course. Cannot be used + * in conjunction with *shift_dates*. + */ + 'date_shift_options[remove_dates]'?: boolean; + /** + * Whether to shift dates in the copied course + */ + 'date_shift_options[shift_dates]'?: boolean; + /** + * The type of the migration. Use the + * {api:ContentMigrationsController#available_migrators Migrator} endpoint to + * see all available migrators. Default allowed values: + * canvas_cartridge_importer, common_cartridge_importer, + * course_copy_importer, zip_file_importer, qti_converter, moodle_converter + */ + migration_type: string; + /** + * Required if uploading a file. This is the first step in uploading a file + * to the content migration. See the {file:file_uploads.html File Upload + * Documentation} for details on the file upload workflow. + */ + 'pre_attachment[name]'?: string; + /** + * Other file upload properties, See {file:file_uploads.html File Upload + * Documentation} + */ + 'pre_attachment[todo]'?: string; + /** + * A URL to download the file from. Must not require authentication. + */ + 'settings[file_url]'?: string; + /** + * The folder to unzip the .zip file into for a zip_file_import. + */ + 'settings[folder_id]'?: string; + /** + * Whether to overwrite quizzes with the same identifiers between content + * packages. + */ + 'settings[overwrite_quizzes]'?: boolean; + /** + * The existing question bank ID to import questions into if not specified in + * the content package. + */ + 'settings[question_bank_id]'?: number; + /** + * The question bank to import questions into if not specified in the content + * package, if both bank id and name are set, id will take precedence. + */ + 'settings[question_bank_name]'?: string; + /** + * The course to copy from for a course copy migration. (required if doing + * course copy) + */ + 'settings[source_course_id]'?: string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/content_migrations'; +}; + +export type CreateContentMigrationAccountsResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type CreateContentMigrationAccountsResponse = CreateContentMigrationAccountsResponses[keyof CreateContentMigrationAccountsResponses]; + +export type ListMigrationSystemsAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/content_migrations/migrators'; +}; + +export type ListMigrationSystemsAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListMigrationSystemsAccountsResponse = ListMigrationSystemsAccountsResponses[keyof ListMigrationSystemsAccountsResponses]; + +export type ListMigrationIssuesAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + content_migration_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/content_migrations/{content_migration_id}/migration_issues'; +}; + +export type ListMigrationIssuesAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListMigrationIssuesAccountsResponse = ListMigrationIssuesAccountsResponses[keyof ListMigrationIssuesAccountsResponses]; + +export type GetMigrationIssueAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + content_migration_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/content_migrations/{content_migration_id}/migration_issues/{id}'; +}; + +export type GetMigrationIssueAccountsResponses = { + /** + * No response was specified + */ + 200: MigrationIssue; +}; + +export type GetMigrationIssueAccountsResponse = GetMigrationIssueAccountsResponses[keyof GetMigrationIssueAccountsResponses]; + +export type UpdateMigrationIssueAccountsData = { + body: { + /** + * Set the workflow_state of the issue. + */ + workflow_state: 'active' | 'resolved'; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + content_migration_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/content_migrations/{content_migration_id}/migration_issues/{id}'; +}; + +export type UpdateMigrationIssueAccountsResponses = { + /** + * No response was specified + */ + 200: MigrationIssue; +}; + +export type UpdateMigrationIssueAccountsResponse = UpdateMigrationIssueAccountsResponses[keyof UpdateMigrationIssueAccountsResponses]; + +export type GetContentMigrationAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/content_migrations/{id}'; +}; + +export type GetContentMigrationAccountsResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type GetContentMigrationAccountsResponse = GetContentMigrationAccountsResponses[keyof GetContentMigrationAccountsResponses]; + +export type UpdateContentMigrationAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/content_migrations/{id}'; +}; + +export type UpdateContentMigrationAccountsResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type UpdateContentMigrationAccountsResponse = UpdateContentMigrationAccountsResponses[keyof UpdateContentMigrationAccountsResponses]; + +export type CreateNewCourseData = { + body?: { + /** + * If true, students can attach files to forum posts. + */ + 'course[allow_student_forum_attachments]'?: boolean; + /** + * If true, students will be able to modify the course wiki. + */ + 'course[allow_student_wiki_edits]'?: boolean; + /** + * If true, course members will be able to comment on wiki pages. + */ + 'course[allow_wiki_comments]'?: boolean; + /** + * Set to true to weight final grade based on assignment groups percentages. + */ + 'course[apply_assignment_group_weights]'?: boolean; + /** + * The course code for the course. + */ + 'course[course_code]'?: string; + /** + * Optional. Specifies the format of the course. (Should be 'on_campus', 'online', or 'blended') + */ + 'course[course_format]'?: string; + /** + * The type of page that users will see when they first visit the course + * * 'feed' Recent Activity Dashboard + * * 'modules' Course Modules/Sections Page + * * 'assignments' Course Assignments List + * * 'syllabus' Course Syllabus Page + * other types may be added in the future + */ + 'course[default_view]'?: 'feed' | 'wiki' | 'modules' | 'syllabus' | 'assignments'; + /** + * Course end date in ISO8601 format. e.g. 2011-01-01T01:00Z + */ + 'course[end_at]'?: string; + /** + * The grading standard id to set for the course. If no value is provided for this argument the current grading_standard will be un-set from this course. + */ + 'course[grading_standard_id]'?: number; + /** + * If this option is set to true, the totals in student grades summary will + * be hidden. + */ + 'course[hide_final_grades]'?: boolean; + /** + * The unique Integration identifier. + */ + 'course[integration_id]'?: string; + /** + * Set to true if course is public to both authenticated and unauthenticated users. + */ + 'course[is_public]'?: boolean; + /** + * Set to true if course is public only to authenticated users. + */ + 'course[is_public_to_auth_users]'?: boolean; + /** + * The name of the licensing. Should be one of the following abbreviations + * (a descriptive name is included in parenthesis for reference): + * - 'private' (Private Copyrighted) + * - 'cc_by_nc_nd' (CC Attribution Non-Commercial No Derivatives) + * - 'cc_by_nc_sa' (CC Attribution Non-Commercial Share Alike) + * - 'cc_by_nc' (CC Attribution Non-Commercial) + * - 'cc_by_nd' (CC Attribution No Derivatives) + * - 'cc_by_sa' (CC Attribution Share Alike) + * - 'cc_by' (CC Attribution) + * - 'public_domain' (Public Domain). + */ + 'course[license]'?: string; + /** + * The name of the course. If omitted, the course will be named "Unnamed + * Course." + */ + 'course[name]'?: string; + /** + * Set to true if the course is open enrollment. + */ + 'course[open_enrollment]'?: boolean; + /** + * A publicly visible description of the course. + */ + 'course[public_description]'?: string; + /** + * Set to true to make the course syllabus public. + */ + 'course[public_syllabus]'?: boolean; + /** + * Set to true to make the course syllabus public for authenticated users. + */ + 'course[public_syllabus_to_auth]'?: boolean; + /** + * Set to true to restrict user enrollments to the start and end dates of the + * course. + */ + 'course[restrict_enrollments_to_course_dates]'?: boolean; + /** + * Set to true if the course is self enrollment. + */ + 'course[self_enrollment]'?: boolean; + /** + * The unique SIS identifier. + */ + 'course[sis_course_id]'?: string; + /** + * Course start date in ISO8601 format, e.g. 2011-01-01T01:00Z + */ + 'course[start_at]'?: string; + /** + * The syllabus body for the course + */ + 'course[syllabus_body]'?: string; + /** + * The unique ID of the term to create to course in. + */ + 'course[term_id]'?: number; + /** + * The time zone for the course. Allowed time zones are + * {http://www.iana.org/time-zones IANA time zones} or friendlier + * {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. + */ + 'course[time_zone]'?: string; + /** + * When true, will first try to re-activate a deleted course with matching sis_course_id if possible. + */ + enable_sis_reactivation?: boolean; + /** + * Set to true to enroll the current user as the teacher. + */ + enroll_me?: boolean; + /** + * If this option is set to true, the course will be available to students + * immediately. + */ + offer?: boolean; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/courses'; +}; + +export type CreateNewCourseResponses = { + /** + * No response was specified + */ + 200: Course; +}; + +export type CreateNewCourseResponse = CreateNewCourseResponses[keyof CreateNewCourseResponses]; + +export type UpdateCoursesData = { + body: { + /** + * List of ids of courses to update. At most 500 courses may be updated in one call. + */ + course_ids: Array; + /** + * no description + */ + event: 'offer' | 'conclude' | 'delete' | 'undelete'; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/courses'; +}; + +export type UpdateCoursesResponses = { + /** + * No response was specified + */ + 200: Progress; +}; + +export type UpdateCoursesResponse = UpdateCoursesResponses[keyof UpdateCoursesResponses]; + +export type GetSingleCourseAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * - "all_courses": Also search recently deleted courses. + * - "permissions": Include permissions the current user has + * for the course. + * - "observed_users": include observed users in the enrollments + * - "course_image": Optional course image data for when there is a course image + * and the course image feature flag has been enabled + */ + include?: 'needs_grading_count' | 'syllabus_body' | 'public_description' | 'total_scores' | 'current_grading_period_scores' | 'term' | 'account' | 'course_progress' | 'sections' | 'storage_quota_used_mb' | 'total_students' | 'passback_status' | 'favorites' | 'teachers' | 'observed_users' | 'all_courses' | 'permissions' | 'course_image'; + }; + url: '/v1/accounts/{account_id}/courses/{id}'; +}; + +export type GetSingleCourseAccountsResponses = { + /** + * No response was specified + */ + 200: Course; +}; + +export type GetSingleCourseAccountsResponse = GetSingleCourseAccountsResponses[keyof GetSingleCourseAccountsResponses]; + +export type CreateToolFromToolconfigurationAccountsData = { + body?: { + /** + * if course + */ + course_id?: string; + }; + path: { + /** + * if account + */ + account_id: string; + /** + * no description + */ + developer_key_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/developer_keys/{developer_key_id}/create_tool'; +}; + +export type CreateToolFromToolconfigurationAccountsResponses = { + /** + * No response was specified + */ + 200: ContextExternalTool; +}; + +export type CreateToolFromToolconfigurationAccountsResponse = CreateToolFromToolconfigurationAccountsResponses[keyof CreateToolFromToolconfigurationAccountsResponses]; + +export type EnrollmentByIdData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * The ID of the enrollment object + */ + id: number; + }; + query?: never; + url: '/v1/accounts/{account_id}/enrollments/{id}'; +}; + +export type EnrollmentByIdResponses = { + /** + * No response was specified + */ + 200: Enrollment; +}; + +export type EnrollmentByIdResponse = EnrollmentByIdResponses[keyof EnrollmentByIdResponses]; + +export type ListExternalToolsAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The partial name of the tools to match and return. + */ + search_term?: string; + /** + * If true, then only tools that are meant to be selectable are returned + */ + selectable?: boolean; + /** + * If true, then include tools installed in all accounts above the current context + */ + include_parents?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/external_tools'; +}; + +export type ListExternalToolsAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateExternalToolAccountsData = { + body: { + /** + * The layout type to use when launching the tool. Must be + * "full_width", "full_width_in_context", "borderless", or "default" + */ + 'account_navigation[display_type]'?: string; + /** + * Set this to enable this feature + */ + 'account_navigation[enabled]'?: boolean; + /** + * The height of the dialog the tool is launched in + */ + 'account_navigation[selection_height]'?: string; + /** + * The width of the dialog the tool is launched in + */ + 'account_navigation[selection_width]'?: string; + /** + * The text that will show on the left-tab in the account navigation + */ + 'account_navigation[text]'?: string; + /** + * The url of the external tool for account navigation + */ + 'account_navigation[url]'?: string; + /** + * Configuration can be passed in as CC xml instead of using query + * parameters. If this value is "by_url" or "by_xml" then an xml + * configuration will be expected in either the "config_xml" or "config_url" + * parameter. Note that the name parameter overrides the tool name provided + * in the xml + */ + config_type?: string; + /** + * URL where the server can retrieve an XML tool configuration, as specified + * in the CC xml specification. This is required if "config_type" is set to + * "by_url" + */ + config_url?: string; + /** + * XML tool configuration, as specified in the CC xml specification. This is + * required if "config_type" is set to "by_xml" + */ + config_xml?: string; + /** + * The consumer key for the external tool + */ + consumer_key: string; + /** + * Set this to enable this feature + */ + 'course_home_sub_navigation[enabled]'?: boolean; + /** + * The url of the icon to show in the right-side course home navigation menu + */ + 'course_home_sub_navigation[icon_url]'?: string; + /** + * The text that will show on the right-side course home navigation menu + */ + 'course_home_sub_navigation[text]'?: string; + /** + * The url of the external tool for right-side course home navigation menu + */ + 'course_home_sub_navigation[url]'?: string; + /** + * Whether the navigation option will show in the course by default or + * whether the teacher will have to explicitly enable it + */ + 'course_navigation[default]'?: boolean; + /** + * The layout type to use when launching the tool. Must be + * "full_width", "full_width_in_context", "borderless", or "default" + */ + 'course_navigation[display_type]'?: string; + /** + * Set this to enable this feature + */ + 'course_navigation[enabled]'?: boolean; + /** + * The text that will show on the left-tab in the course navigation + */ + 'course_navigation[text]'?: string; + /** + * Who will see the navigation tab. "admins" for course admins, "members" for + * students, null for everyone + */ + 'course_navigation[visibility]'?: 'admins' | 'members'; + /** + * Determines how the navigation tab will be opened. + * "_blank" Launches the external tool in a new window or tab. + * "_self" (Default) Launches the external tool in an iframe inside of Canvas. + */ + 'course_navigation[windowTarget]'?: '_blank' | '_self'; + /** + * Custom fields that will be sent to the tool consumer; can be used + * multiple times + */ + 'custom_fields[field_name]'?: string; + /** + * A description of the tool + */ + description?: string; + /** + * The domain to match links against. Either "url" or "domain" should be + * set, not both. + */ + domain?: string; + /** + * Set this to enable this feature + */ + 'editor_button[enabled]'?: boolean; + /** + * The url of the icon to show in the WYSIWYG editor + */ + 'editor_button[icon_url]'?: string; + /** + * Set this to ContentItemSelectionRequest to tell the tool to use + * content-item; otherwise, omit + */ + 'editor_button[message_type]'?: string; + /** + * The height of the dialog the tool is launched in + */ + 'editor_button[selection_height]'?: string; + /** + * The width of the dialog the tool is launched in + */ + 'editor_button[selection_width]'?: string; + /** + * The url of the external tool + */ + 'editor_button[url]'?: string; + /** + * Set this to enable this feature + */ + 'homework_submission[enabled]'?: boolean; + /** + * Set this to ContentItemSelectionRequest to tell the tool to use + * content-item; otherwise, omit + */ + 'homework_submission[message_type]'?: string; + /** + * The text that will show on the homework submission tab + */ + 'homework_submission[text]'?: string; + /** + * The url of the external tool + */ + 'homework_submission[url]'?: string; + /** + * The url of the icon to show for this tool + */ + icon_url?: string; + /** + * Set this to enable this feature + */ + 'link_selection[enabled]'?: boolean; + /** + * Set this to ContentItemSelectionRequest to tell the tool to use + * content-item; otherwise, omit + */ + 'link_selection[message_type]'?: string; + /** + * The text that will show for the link selection text + */ + 'link_selection[text]'?: string; + /** + * The url of the external tool + */ + 'link_selection[url]'?: string; + /** + * Set this to enable this feature + */ + 'migration_selection[enabled]'?: boolean; + /** + * Set this to ContentItemSelectionRequest to tell the tool to use + * content-item; otherwise, omit + */ + 'migration_selection[message_type]'?: string; + /** + * The url of the external tool + */ + 'migration_selection[url]'?: string; + /** + * The name of the tool + */ + name: string; + /** + * Default: false, if set to true the tool won't show up in the external tool + * selection UI in modules and assignments + */ + not_selectable?: boolean; + /** + * Default: false, if set to true LTI query params will not be copied to the + * post body. + */ + oauth_compliant?: boolean; + /** + * What information to send to the external tool. + */ + privacy_level: 'anonymous' | 'name_only' | 'public'; + /** + * Set this to enable this feature + */ + 'resource_selection[enabled]'?: boolean; + /** + * The url of the icon to show in the module external tool list + */ + 'resource_selection[icon_url]'?: string; + /** + * The height of the dialog the tool is launched in + */ + 'resource_selection[selection_height]'?: string; + /** + * The width of the dialog the tool is launched in + */ + 'resource_selection[selection_width]'?: string; + /** + * The url of the external tool + */ + 'resource_selection[url]'?: string; + /** + * The shared secret with the external tool + */ + shared_secret: string; + /** + * The default text to show for this tool + */ + text?: string; + /** + * Set this to enable this feature + */ + 'tool_configuration[enabled]'?: boolean; + /** + * Set this to ContentItemSelectionRequest to tell the tool to use + * content-item; otherwise, omit + */ + 'tool_configuration[message_type]'?: string; + /** + * Set this to default the lis_person_contact_email_primary to prefer + * provisioned sis_email; otherwise, omit + */ + 'tool_configuration[prefer_sis_email]'?: boolean; + /** + * The url of the external tool + */ + 'tool_configuration[url]'?: string; + /** + * The url to match links against. Either "url" or "domain" should be set, + * not both. + */ + url?: string; + /** + * Set this to enable this feature + */ + 'user_navigation[enabled]'?: boolean; + /** + * The text that will show on the left-tab in the user navigation + */ + 'user_navigation[text]'?: string; + /** + * The url of the external tool for user navigation + */ + 'user_navigation[url]'?: string; + /** + * Who will see the navigation tab. "admins" for admins, "public" or + * "members" for everyone + */ + 'user_navigation[visibility]'?: 'admins' | 'members' | 'public'; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/external_tools'; +}; + +export type CreateExternalToolAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSessionlessLaunchUrlForExternalToolAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The external id of the tool to launch. + */ + id?: string; + /** + * The LTI launch url for the external tool. + */ + url?: string; + /** + * The assignment id for an assignment launch. Required if launch_type is set to "assessment". + */ + assignment_id?: string; + /** + * The assignment id for a module item launch. Required if launch_type is set to "module_item". + */ + module_item_id?: string; + /** + * The type of launch to perform on the external tool. Placement names (eg. "course_navigation") + * can also be specified to use the custom launch url for that placement; if done, the tool id + * must be provided. + */ + launch_type?: 'assessment' | 'module_item'; + }; + url: '/v1/accounts/{account_id}/external_tools/sessionless_launch'; +}; + +export type GetSessionlessLaunchUrlForExternalToolAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteExternalToolAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + external_tool_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/external_tools/{external_tool_id}'; +}; + +export type DeleteExternalToolAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleExternalToolAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + external_tool_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/external_tools/{external_tool_id}'; +}; + +export type GetSingleExternalToolAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type EditExternalToolAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + external_tool_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/external_tools/{external_tool_id}'; +}; + +export type EditExternalToolAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListFeaturesAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/features'; +}; + +export type ListFeaturesAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListFeaturesAccountsResponse = ListFeaturesAccountsResponses[keyof ListFeaturesAccountsResponses]; + +export type ListEnabledFeaturesAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/features/enabled'; +}; + +export type ListEnabledFeaturesAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RemoveFeatureFlagAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + feature: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/features/flags/{feature}'; +}; + +export type RemoveFeatureFlagAccountsResponses = { + /** + * No response was specified + */ + 200: FeatureFlag; +}; + +export type RemoveFeatureFlagAccountsResponse = RemoveFeatureFlagAccountsResponses[keyof RemoveFeatureFlagAccountsResponses]; + +export type GetFeatureFlagAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + feature: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/features/flags/{feature}'; +}; + +export type GetFeatureFlagAccountsResponses = { + /** + * No response was specified + */ + 200: FeatureFlag; +}; + +export type GetFeatureFlagAccountsResponse = GetFeatureFlagAccountsResponses[keyof GetFeatureFlagAccountsResponses]; + +export type SetFeatureFlagAccountsData = { + body?: { + /** + * "off":: The feature is not available for the course, user, or account and sub-accounts. + * "allowed":: (valid only on accounts) The feature is off in the account, but may be enabled in + * sub-accounts and courses by setting a feature flag on the sub-account or course. + * "on":: The feature is turned on unconditionally for the user, course, or account and sub-accounts. + */ + state?: false | 'allowed' | true; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + feature: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/features/flags/{feature}'; +}; + +export type SetFeatureFlagAccountsResponses = { + /** + * No response was specified + */ + 200: FeatureFlag; +}; + +export type SetFeatureFlagAccountsResponse = SetFeatureFlagAccountsResponses[keyof SetFeatureFlagAccountsResponses]; + +export type ListGradingPeriodsAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/grading_periods'; +}; + +export type ListGradingPeriodsAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListGradingPeriodsAccountsResponse = ListGradingPeriodsAccountsResponses[keyof ListGradingPeriodsAccountsResponses]; + +export type DeleteGradingPeriodAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/grading_periods/{id}'; +}; + +export type DeleteGradingPeriodAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListGradingStandardsAvailableInContextAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/grading_standards'; +}; + +export type ListGradingStandardsAvailableInContextAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListGradingStandardsAvailableInContextAccountsResponse = ListGradingStandardsAvailableInContextAccountsResponses[keyof ListGradingStandardsAvailableInContextAccountsResponses]; + +export type CreateNewGradingStandardAccountsData = { + body: { + /** + * The name for an entry value within a GradingStandard that describes the range of the value + * e.g. A- + */ + 'grading_scheme_entry[name]': Array; + /** + * The value for the name of the entry within a GradingStandard. + * The entry represents the lower bound of the range for the entry. + * This range includes the value up to the next entry in the GradingStandard, + * or 100 if there is no upper bound. The lowest value will have a lower bound range of 0. + * e.g. 93 + */ + 'grading_scheme_entry[value]': Array; + /** + * The title for the Grading Standard. + */ + title: string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/grading_standards'; +}; + +export type CreateNewGradingStandardAccountsResponses = { + /** + * No response was specified + */ + 200: GradingStandard; +}; + +export type CreateNewGradingStandardAccountsResponse = CreateNewGradingStandardAccountsResponses[keyof CreateNewGradingStandardAccountsResponses]; + +export type GetSingleGradingStandardInContextAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + grading_standard_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/grading_standards/{grading_standard_id}'; +}; + +export type GetSingleGradingStandardInContextAccountsResponses = { + /** + * No response was specified + */ + 200: GradingStandard; +}; + +export type GetSingleGradingStandardInContextAccountsResponse = GetSingleGradingStandardInContextAccountsResponses[keyof GetSingleGradingStandardInContextAccountsResponses]; + +export type ListGroupCategoriesForContextAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/group_categories'; +}; + +export type ListGroupCategoriesForContextAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListGroupCategoriesForContextAccountsResponse = ListGroupCategoriesForContextAccountsResponses[keyof ListGroupCategoriesForContextAccountsResponses]; + +export type CreateGroupCategoryAccountsData = { + body: { + /** + * Assigns group leaders automatically when generating and allocating students to groups + * Valid values are: + * "first":: the first student to be allocated to a group is the leader + * "random":: a random student from all members is chosen as the leader + */ + auto_leader?: 'first' | 'random'; + /** + * Create this number of groups (Course Only). + */ + create_group_count?: number; + /** + * Limit the maximum number of users in each group (Course Only). Requires + * self signup. + */ + group_limit?: number; + /** + * Name of the group category + */ + name: string; + /** + * Allow students to sign up for a group themselves (Course Only). + * valid values are: + * "enabled":: allows students to self sign up for any group in course + * "restricted":: allows students to self sign up only for groups in the + * same section null disallows self sign up + */ + self_signup?: 'enabled' | 'restricted'; + /** + * The unique SIS identifier. + */ + sis_group_category_id?: string; + /** + * (Deprecated) + * Create this number of groups, and evenly distribute students + * among them. not allowed with "enable_self_signup". because + * the group assignment happens synchronously, it's recommended + * that you instead use the assign_unassigned_members endpoint. + * (Course Only) + */ + split_group_count?: string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/group_categories'; +}; + +export type CreateGroupCategoryAccountsResponses = { + /** + * No response was specified + */ + 200: GroupCategory; +}; + +export type CreateGroupCategoryAccountsResponse = CreateGroupCategoryAccountsResponses[keyof CreateGroupCategoryAccountsResponses]; + +export type ListGroupsAvailableInContextAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * Will only include groups that the user belongs to if this is set + */ + only_own_groups?: boolean; + /** + * - "tabs": Include the list of tabs configured for each group. See the + * {api:TabsController#index List available tabs API} for more information. + */ + include?: 'tabs'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/groups'; +}; + +export type ListGroupsAvailableInContextAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListGroupsAvailableInContextAccountsResponse = ListGroupsAvailableInContextAccountsResponses[keyof ListGroupsAvailableInContextAccountsResponses]; + +export type GetHelpLinksData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/help_links'; +}; + +export type GetHelpLinksResponses = { + /** + * No response was specified + */ + 200: HelpLinks; +}; + +export type GetHelpLinksResponse = GetHelpLinksResponses[keyof GetHelpLinksResponses]; + +export type ListUserLoginsAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/logins'; +}; + +export type ListUserLoginsAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateUserLoginData = { + body: { + /** + * The authentication provider this login is associated with. Logins + * associated with a specific provider can only be used with that provider. + * Legacy providers (LDAP, CAS, SAML) will search for logins associated with + * them, or unassociated logins. New providers will only search for logins + * explicitly associated with them. This can be the integer ID of the + * provider, or the type of the provider (in which case, it will find the + * first matching provider). + */ + 'login[authentication_provider_id]'?: string; + /** + * Integration ID for the login. To set this parameter, the caller must be able to + * manage SIS permissions on the account. The Integration ID is a secondary + * identifier useful for more complex SIS integrations. + */ + 'login[integration_id]'?: string; + /** + * The new login's password. + */ + 'login[password]'?: string; + /** + * SIS ID for the login. To set this parameter, the caller must be able to + * manage SIS permissions on the account. + */ + 'login[sis_user_id]'?: string; + /** + * The unique ID for the new login. + */ + 'login[unique_id]': string; + /** + * The ID of the user to create the login for. + */ + 'user[id]': string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/logins'; +}; + +export type CreateUserLoginResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type EditUserLoginData = { + body?: { + /** + * Integration ID for the login. To set this parameter, the caller must be able to + * manage SIS permissions on the account. The Integration ID is a secondary + * identifier useful for more complex SIS integrations. + */ + 'login[integration_id]'?: string; + /** + * The new password for the login. Can only be set by an admin user if admins + * are allowed to change passwords for the account. + */ + 'login[password]'?: string; + /** + * SIS ID for the login. To set this parameter, the caller must be able to + * manage SIS permissions on the account. + */ + 'login[sis_user_id]'?: string; + /** + * The new unique ID for the login. + */ + 'login[unique_id]'?: string; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/logins/{id}'; +}; + +export type EditUserLoginResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetAllOutcomeLinksForContextAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The detail level of the outcomes. Defaults to "abbrev". + * Specify "full" for more information. + */ + outcome_style?: string; + /** + * The detail level of the outcome groups. Defaults to "abbrev". + * Specify "full" for more information. + */ + outcome_group_style?: string; + }; + url: '/v1/accounts/{account_id}/outcome_group_links'; +}; + +export type GetAllOutcomeLinksForContextAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAllOutcomeLinksForContextAccountsResponse = GetAllOutcomeLinksForContextAccountsResponses[keyof GetAllOutcomeLinksForContextAccountsResponses]; + +export type GetAllOutcomeGroupsForContextAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_groups'; +}; + +export type GetAllOutcomeGroupsForContextAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAllOutcomeGroupsForContextAccountsResponse = GetAllOutcomeGroupsForContextAccountsResponses[keyof GetAllOutcomeGroupsForContextAccountsResponses]; + +export type DeleteOutcomeGroupAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_groups/{id}'; +}; + +export type DeleteOutcomeGroupAccountsResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type DeleteOutcomeGroupAccountsResponse = DeleteOutcomeGroupAccountsResponses[keyof DeleteOutcomeGroupAccountsResponses]; + +export type ShowOutcomeGroupAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_groups/{id}'; +}; + +export type ShowOutcomeGroupAccountsResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type ShowOutcomeGroupAccountsResponse = ShowOutcomeGroupAccountsResponses[keyof ShowOutcomeGroupAccountsResponses]; + +export type UpdateOutcomeGroupAccountsData = { + body?: { + /** + * The new outcome group description. + */ + description?: string; + /** + * The id of the new parent outcome group. + */ + parent_outcome_group_id?: number; + /** + * The new outcome group title. + */ + title?: string; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_groups/{id}'; +}; + +export type UpdateOutcomeGroupAccountsResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type UpdateOutcomeGroupAccountsResponse = UpdateOutcomeGroupAccountsResponses[keyof UpdateOutcomeGroupAccountsResponses]; + +export type ImportOutcomeGroupAccountsData = { + body: { + /** + * If true, perform action asynchronously. In that case, this endpoint + * will return a Progress object instead of an OutcomeGroup. + * Use the {api:ProgressController#show progress endpoint} + * to query the status of the operation. The imported outcome group id + * and url will be returned in the results of the Progress object + * as "outcome_group_id" and "outcome_group_url" + */ + async?: boolean; + /** + * The ID of the source outcome group. + */ + source_outcome_group_id: number; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_groups/{id}/import'; +}; + +export type ImportOutcomeGroupAccountsResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type ImportOutcomeGroupAccountsResponse = ImportOutcomeGroupAccountsResponses[keyof ImportOutcomeGroupAccountsResponses]; + +export type ListLinkedOutcomesAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * The detail level of the outcomes. Defaults to "abbrev". + * Specify "full" for more information. + */ + outcome_style?: string; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/outcome_groups/{id}/outcomes'; +}; + +export type ListLinkedOutcomesAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListLinkedOutcomesAccountsResponse = ListLinkedOutcomesAccountsResponses[keyof ListLinkedOutcomesAccountsResponses]; + +export type CreateLinkOutcomeAccountsData = { + body?: { + /** + * The new calculation int. Only applies if the calculation_method is "decaying_average" or "n_mastery" + */ + calculation_int?: number; + /** + * The new calculation method. Defaults to "highest" + */ + calculation_method?: 'decaying_average' | 'n_mastery' | 'latest' | 'highest'; + /** + * The description of the new outcome. + */ + description?: string; + /** + * A friendly name shown in reports for outcomes with cryptic titles, + * such as common core standards names. + */ + display_name?: string; + /** + * The mastery threshold for the embedded rubric criterion. + */ + mastery_points?: number; + /** + * The ID of the old outcome group. Only used if outcome_id is present. + */ + move_from?: number; + /** + * The ID of the existing outcome to link. + */ + outcome_id?: number; + /** + * The description of a rating level for the embedded rubric criterion. + */ + 'ratings[description]'?: Array; + /** + * The points corresponding to a rating level for the embedded rubric criterion. + */ + 'ratings[points]'?: Array; + /** + * The title of the new outcome. Required if outcome_id is absent. + */ + title?: string; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_groups/{id}/outcomes'; +}; + +export type CreateLinkOutcomeAccountsResponses = { + /** + * No response was specified + */ + 200: OutcomeLink; +}; + +export type CreateLinkOutcomeAccountsResponse = CreateLinkOutcomeAccountsResponses[keyof CreateLinkOutcomeAccountsResponses]; + +export type UnlinkOutcomeAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + /** + * ID + */ + outcome_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_groups/{id}/outcomes/{outcome_id}'; +}; + +export type UnlinkOutcomeAccountsResponses = { + /** + * No response was specified + */ + 200: OutcomeLink; +}; + +export type UnlinkOutcomeAccountsResponse = UnlinkOutcomeAccountsResponses[keyof UnlinkOutcomeAccountsResponses]; + +export type CreateLinkOutcomeAccountsOutcomeIdData = { + body?: { + /** + * The new calculation int. Only applies if the calculation_method is "decaying_average" or "n_mastery" + */ + calculation_int?: number; + /** + * The new calculation method. Defaults to "highest" + */ + calculation_method?: 'decaying_average' | 'n_mastery' | 'latest' | 'highest'; + /** + * The description of the new outcome. + */ + description?: string; + /** + * A friendly name shown in reports for outcomes with cryptic titles, + * such as common core standards names. + */ + display_name?: string; + /** + * The mastery threshold for the embedded rubric criterion. + */ + mastery_points?: number; + /** + * The ID of the old outcome group. Only used if outcome_id is present. + */ + move_from?: number; + /** + * The description of a rating level for the embedded rubric criterion. + */ + 'ratings[description]'?: Array; + /** + * The points corresponding to a rating level for the embedded rubric criterion. + */ + 'ratings[points]'?: Array; + /** + * The title of the new outcome. Required if outcome_id is absent. + */ + title?: string; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + /** + * The ID of the existing outcome to link. + */ + outcome_id: number; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_groups/{id}/outcomes/{outcome_id}'; +}; + +export type CreateLinkOutcomeAccountsOutcomeIdResponses = { + /** + * No response was specified + */ + 200: OutcomeLink; +}; + +export type CreateLinkOutcomeAccountsOutcomeIdResponse = CreateLinkOutcomeAccountsOutcomeIdResponses[keyof CreateLinkOutcomeAccountsOutcomeIdResponses]; + +export type ListSubgroupsAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/outcome_groups/{id}/subgroups'; +}; + +export type ListSubgroupsAccountsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListSubgroupsAccountsResponse = ListSubgroupsAccountsResponses[keyof ListSubgroupsAccountsResponses]; + +export type CreateSubgroupAccountsData = { + body: { + /** + * The description of the new outcome group. + */ + description?: string; + /** + * The title of the new outcome group. + */ + title: string; + /** + * A custom GUID for the learning standard + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_groups/{id}/subgroups'; +}; + +export type CreateSubgroupAccountsResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type CreateSubgroupAccountsResponse = CreateSubgroupAccountsResponses[keyof CreateSubgroupAccountsResponses]; + +export type ImportOutcomesAccountsData = { + body?: { + /** + * There are two ways to post outcome import data - either via a + * application/x-www-form-urlencoded form-field-style attachment, or via a non-multipart + * raw post request. + * + * 'attachment' is required for application/x-www-form-urlencoded style posts. Assumed to + * be outcome data from a file upload form field named 'attachment'. + * + * Examples: + * curl -F attachment=@ -H "Authorization: Bearer " \ + * 'https:///api/v1/accounts//outcome_imports?import_type=instructure_csv' + * curl -F attachment=@ -H "Authorization: Bearer " \ + * 'https:///api/v1/courses//outcome_imports?import_type=instructure_csv' + * + * If you decide to do a raw post, you can skip the 'attachment' argument, + * but you will then be required to provide a suitable Content-Type header. + * You are encouraged to also provide the 'extension' argument. + * + * Examples: + * curl -H 'Content-Type: text/csv' --data-binary @.csv \ + * -H "Authorization: Bearer " \ + * 'https:///api/v1/accounts//outcome_imports?import_type=instructure_csv' + * + * curl -H 'Content-Type: text/csv' --data-binary @.csv \ + * -H "Authorization: Bearer " \ + * 'https:///api/v1/courses//outcome_imports?import_type=instructure_csv' + */ + attachment?: string; + /** + * Recommended for raw post request style imports. This field will be used to + * distinguish between csv and other file format extensions that + * would usually be provided with the filename in the multipart post request + * scenario. If not provided, this value will be inferred from the + * Content-Type, falling back to csv-file format if all else fails. + */ + extension?: string; + /** + * Choose the data format for reading outcome data. With a standard Canvas + * install, this option can only be 'instructure_csv', and if unprovided, + * will be assumed to be so. Can be part of the query string. + */ + import_type?: string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_imports'; +}; + +export type ImportOutcomesAccountsResponses = { + /** + * No response was specified + */ + 200: OutcomeImport; +}; + +export type ImportOutcomesAccountsResponse = ImportOutcomesAccountsResponses[keyof ImportOutcomesAccountsResponses]; + +export type GetOutcomeImportStatusAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_imports/{id}'; +}; + +export type GetOutcomeImportStatusAccountsResponses = { + /** + * No response was specified + */ + 200: OutcomeImport; +}; + +export type GetOutcomeImportStatusAccountsResponse = GetOutcomeImportStatusAccountsResponses[keyof GetOutcomeImportStatusAccountsResponses]; + +export type GetProficiencyRatingsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_proficiency'; +}; + +export type GetProficiencyRatingsResponses = { + /** + * No response was specified + */ + 200: Proficiency; +}; + +export type GetProficiencyRatingsResponse = GetProficiencyRatingsResponses[keyof GetProficiencyRatingsResponses]; + +export type CreateUpdateProficiencyRatingsData = { + body?: { + /** + * The color associated with the rating level. Should be a hex color code like '00FFFF'. + */ + 'ratings[color]'?: Array; + /** + * The description of the rating level. + */ + 'ratings[description]'?: Array; + /** + * Indicates the rating level where mastery is first achieved. Only one rating in a proficiency should be marked for mastery. + */ + 'ratings[mastery]'?: Array; + /** + * The non-negative number of points of the rating level. Points across ratings should be strictly decreasing in value. + */ + 'ratings[points]'?: Array; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/outcome_proficiency'; +}; + +export type CreateUpdateProficiencyRatingsResponses = { + /** + * No response was specified + */ + 200: Proficiency; +}; + +export type CreateUpdateProficiencyRatingsResponse = CreateUpdateProficiencyRatingsResponses[keyof CreateUpdateProficiencyRatingsResponses]; + +export type AccountPermissionsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * List of permissions to check against the authenticated user. + * Permission names are documented in the {api:RoleOverridesController#add_role Create a role} endpoint. + */ + permissions?: Array; + }; + url: '/v1/accounts/{account_id}/permissions'; +}; + +export type AccountPermissionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListAvailableReportsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/reports'; +}; + +export type ListAvailableReportsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type IndexOfReportsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + report: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/reports/{report}'; +}; + +export type IndexOfReportsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type IndexOfReportsResponse = IndexOfReportsResponses[keyof IndexOfReportsResponses]; + +export type StartReportData = { + body?: { + /** + * The parameters will vary for each report. To fetch a list + * of available parameters for each report, see {api:AccountReportsController#available_reports List Available Reports}. + * A few example parameters have been provided below. Note that the example + * parameters provided below may not be valid for every report. + */ + parameters?: string; + /** + * The id of the course to report on. + * Note: this parameter has been listed to serve as an example and may not be + * valid for every report. + */ + 'parameters[course_id]'?: number; + /** + * If true, user data will be included. If + * false, user data will be omitted. Note: this parameter has been listed to + * serve as an example and may not be valid for every report. + */ + 'parameters[users]'?: boolean; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + report: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/reports/{report}'; +}; + +export type StartReportResponses = { + /** + * No response was specified + */ + 200: Report; +}; + +export type StartReportResponse = StartReportResponses[keyof StartReportResponses]; + +export type DeleteReportData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + report: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/reports/{report}/{id}'; +}; + +export type DeleteReportResponses = { + /** + * No response was specified + */ + 200: Report; +}; + +export type DeleteReportResponse = DeleteReportResponses[keyof DeleteReportResponses]; + +export type StatusOfReportData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + report: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/reports/{report}/{id}'; +}; + +export type StatusOfReportResponses = { + /** + * No response was specified + */ + 200: Report; +}; + +export type StatusOfReportResponse = StatusOfReportResponses[keyof StatusOfReportResponses]; + +export type ListRolesData = { + body?: never; + path: { + /** + * The id of the account to retrieve roles for. + */ + account_id: string; + }; + query?: { + /** + * Filter by role state. If this argument is omitted, only 'active' roles are + * returned. + */ + state?: 'active' | 'inactive'; + /** + * If this argument is true, all roles inherited from parent accounts will + * be included. + */ + show_inherited?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/roles'; +}; + +export type ListRolesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListRolesResponse = ListRolesResponses[keyof ListRolesResponses]; + +export type CreateNewRoleData = { + body: { + /** + * Specifies the role type that will be used as a base + * for the permissions granted to this role. + * + * Defaults to 'AccountMembership' if absent + */ + base_role_type?: 'AccountMembership' | 'StudentEnrollment' | 'TeacherEnrollment' | 'TaEnrollment' | 'ObserverEnrollment' | 'DesignerEnrollment'; + /** + * Label for the role. + */ + label: string; + /** + * If the value is 1, permission cascades down to sub accounts of the + * account this role is in. The default value is 1. Must be true if + * applies_to_self is false.This value is only returned if enabled is true. + */ + 'permissions[X][applies_to_descendants]'?: boolean; + /** + * If the value is 1, permission applies to the account this role is in. + * The default value is 1. Must be true if applies_to_descendants is false. + * This value is only returned if enabled is true. + */ + 'permissions[X][applies_to_self]'?: boolean; + /** + * If explicit is 1 and enabled is 1, permission will be explicitly + * granted to this role. If explicit is 1 and enabled has any other value + * (typically 0), permission will be explicitly denied to this role. If + * explicit is any other value (typically 0) or absent, or if enabled is + * absent, the value for permission will be inherited from upstream. + * Ignored if permission is locked upstream (in an ancestor account). + * + * May occur multiple times with unique values for . Recognized + * permission names for are: + * + * [For Account-Level Roles Only] + * become_user -- Become other users + * import_sis -- Import SIS data + * manage_account_memberships -- Add/remove other admins for the account + * manage_account_settings -- Manage account-level settings + * manage_alerts -- Manage global alerts + * manage_courses -- Manage ( add / edit / delete ) courses + * manage_developer_keys -- Manage developer keys + * manage_global_outcomes -- Manage learning outcomes + * manage_jobs -- Manage background jobs + * manage_role_overrides -- Manage permissions + * manage_storage_quotas -- Set storage quotas for courses, groups, and users + * manage_sis -- Manage SIS data + * manage_site_settings -- Manage site-wide and plugin settings + * manage_user_logins -- Modify login details for users + * read_course_content -- View course content + * read_course_list -- View the list of courses + * read_messages -- View notifications sent to users + * site_admin -- Use the Site Admin section and admin all other accounts + * view_error_reports -- View error reports + * view_statistics -- View statistics + * manage_feature_flags -- Enable or disable features at an account level + * + * [For both Account-Level and Course-Level roles] + * Note: Applicable enrollment types for course-level roles are given in brackets: + * S = student, T = teacher, A = TA, D = designer, O = observer. + * Lower-case letters indicate permissions that are off by default. + * A missing letter indicates the permission cannot be enabled for the role + * or any derived custom roles. + * change_course_state -- [ TaD ] Change course state + * comment_on_others_submissions -- [sTAD ] View all students' submissions and make comments on them + * create_collaborations -- [STADo] Create student collaborations + * create_conferences -- [STADo] Create web conferences + * import_outcomes -- [ TaDo] Import outcome data + * manage_admin_users -- [ Tad ] Add/remove other teachers, course designers or TAs to the course + * manage_assignments -- [ TADo] Manage (add / edit / delete) assignments and quizzes + * manage_calendar -- [sTADo] Add, edit and delete events on the course calendar + * manage_content -- [ TADo] Manage all other course content + * manage_files -- [ TADo] Manage (add / edit / delete) course files + * manage_grades -- [ TA ] Edit grades + * manage_groups -- [ TAD ] Manage (create / edit / delete) groups + * manage_interaction_alerts -- [ Ta ] Manage alerts + * manage_outcomes -- [sTaDo] Manage learning outcomes + * manage_sections -- [ TaD ] Manage (create / edit / delete) course sections + * manage_students -- [ TAD ] Add/remove students for the course + * manage_user_notes -- [ TA ] Manage faculty journal entries + * manage_rubrics -- [ TAD ] Edit assessing rubrics + * manage_wiki -- [ TADo] Manage (add / edit / delete) pages + * read_forum -- [STADO] View discussions + * moderate_forum -- [sTADo] Moderate discussions (delete/edit others' posts, lock topics) + * post_to_forum -- [STADo] Post to discussions + * create_forum -- [STADo] Create discussions + * read_announcements -- [STADO] View announcements + * read_question_banks -- [ TADo] View and link to question banks + * read_reports -- [ TAD ] View usage reports for the course + * read_roster -- [STADo] See the list of users + * read_sis -- [sTa ] Read SIS data + * send_messages -- [STADo] Send messages to individual course members + * send_messages_all -- [sTADo] Send messages to the entire class + * view_all_grades -- [ TAd ] View all grades + * view_group_pages -- [sTADo] View the group pages of all student groups + * lti_add_edit -- [ TAD ] LTI add and edit + * read_email_addresses -- [sTAdo] See other users' primary email address + * view_user_logins -- [ TA ] View login ids for users + * generate_observer_pairing_code -- [ tAdo] Allow observer pairing code generation + * + * Some of these permissions are applicable only for roles on the site admin + * account, on a root account, or for course-level roles with a particular base role type; + * if a specified permission is inapplicable, it will be ignored. + * + * Additional permissions may exist based on installed plugins. + */ + 'permissions[X][enabled]'?: boolean; + /** + * no description + */ + 'permissions[X][explicit]'?: boolean; + /** + * If the value is 1, permission will be locked downstream (new roles in + * subaccounts cannot override the setting). For any other value, permission + * is left unlocked. Ignored if permission is already locked + * upstream. May occur multiple times with unique values for . + */ + 'permissions[X][locked]'?: boolean; + /** + * Deprecated alias for label. + */ + role?: string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/roles'; +}; + +export type CreateNewRoleResponses = { + /** + * No response was specified + */ + 200: Role; +}; + +export type CreateNewRoleResponse = CreateNewRoleResponses[keyof CreateNewRoleResponses]; + +export type DeactivateRoleData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query: { + /** + * The unique identifier for the role + */ + role_id: number; + /** + * The name for the role + */ + role?: string; + }; + url: '/v1/accounts/{account_id}/roles/{id}'; +}; + +export type DeactivateRoleResponses = { + /** + * No response was specified + */ + 200: Role; +}; + +export type DeactivateRoleResponse = DeactivateRoleResponses[keyof DeactivateRoleResponses]; + +export type GetSingleRoleData = { + body?: never; + path: { + /** + * ID + */ + id: string; + /** + * The id of the account containing the role + */ + account_id: string; + }; + query: { + /** + * The unique identifier for the role + */ + role_id: number; + /** + * The name for the role + */ + role?: string; + }; + url: '/v1/accounts/{account_id}/roles/{id}'; +}; + +export type GetSingleRoleResponses = { + /** + * No response was specified + */ + 200: Role; +}; + +export type GetSingleRoleResponse = GetSingleRoleResponses[keyof GetSingleRoleResponses]; + +export type UpdateRoleData = { + body?: { + /** + * The label for the role. Can only change the label of a custom role that belongs directly to the account. + */ + label?: string; + /** + * If the value is 1, permission cascades down to sub accounts of the + * account this role is in. The default value is 1. Must be true if + * applies_to_self is false.This value is only returned if enabled is true. + */ + 'permissions[X][applies_to_descendants]'?: boolean; + /** + * If the value is 1, permission applies to the account this role is in. + * The default value is 1. Must be true if applies_to_descendants is false. + * This value is only returned if enabled is true. + */ + 'permissions[X][applies_to_self]'?: boolean; + /** + * These arguments are described in the documentation for the + * {api:RoleOverridesController#add_role add_role method}. + */ + 'permissions[X][enabled]'?: boolean; + /** + * no description + */ + 'permissions[X][explicit]'?: boolean; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/roles/{id}'; +}; + +export type UpdateRoleResponses = { + /** + * No response was specified + */ + 200: Role; +}; + +export type UpdateRoleResponse = UpdateRoleResponses[keyof UpdateRoleResponses]; + +export type ActivateRoleData = { + body: { + /** + * The name for the role + */ + role?: unknown; + /** + * The unique identifier for the role + */ + role_id: number; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/roles/{id}/activate'; +}; + +export type ActivateRoleResponses = { + /** + * No response was specified + */ + 200: Role; +}; + +export type ActivateRoleResponse = ActivateRoleResponses[keyof ActivateRoleResponses]; + +export type RedirectToRootOutcomeGroupForContextAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/root_outcome_group'; +}; + +export type RedirectToRootOutcomeGroupForContextAccountsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListRubricsAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/rubrics'; +}; + +export type ListRubricsAccountsResponses = { + /** + * No response was specified + */ + 200: Rubric; +}; + +export type ListRubricsAccountsResponse = ListRubricsAccountsResponses[keyof ListRubricsAccountsResponses]; + +export type GetSingleRubricAccountsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * If included, the type of associated rubric assessments to return. If not included, assessments will be omitted. + */ + include?: 'assessments' | 'graded_assessments' | 'peer_assessments'; + /** + * Applicable only if assessments are being returned. If included, returns either all criteria data associated with the assessment, or just the comments. If not included, both data and comments are omitted. + */ + style?: 'full' | 'comments_only'; + }; + url: '/v1/accounts/{account_id}/rubrics/{id}'; +}; + +export type GetSingleRubricAccountsResponses = { + /** + * No response was specified + */ + 200: Rubric; +}; + +export type GetSingleRubricAccountsResponse = GetSingleRubricAccountsResponses[keyof GetSingleRubricAccountsResponses]; + +export type ListScopesData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The attribute to group the scopes by. By default no grouping is done. + */ + group_by?: 'resource_name'; + }; + url: '/v1/accounts/{account_id}/scopes'; +}; + +export type ListScopesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListScopesResponse = ListScopesResponses[keyof ListScopesResponses]; + +export type SelfRegisterUserData = { + body: { + /** + * The communication channel address, e.g. the user's email address. + */ + 'communication_channel[address]'?: string; + /** + * The communication channel type, e.g. 'email' or 'sms'. + */ + 'communication_channel[type]'?: string; + /** + * User's login ID. Must be a valid email address. + */ + 'pseudonym[unique_id]': string; + /** + * The user's birth date. + */ + 'user[birthdate]'?: string; + /** + * The user's preferred language, from the list of languages Canvas supports. + * This is in RFC-5646 format. + */ + 'user[locale]'?: string; + /** + * The full name of the user. This name will be used by teacher for grading. + */ + 'user[name]': string; + /** + * User's name as it will be displayed in discussions, messages, and comments. + */ + 'user[short_name]'?: string; + /** + * User's name as used to sort alphabetically in lists. + */ + 'user[sortable_name]'?: string; + /** + * Whether the user accepts the terms of use. + */ + 'user[terms_of_use]': boolean; + /** + * The time zone for the user. Allowed time zones are + * {http://www.iana.org/time-zones IANA time zones} or friendlier + * {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. + */ + 'user[time_zone]'?: string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/self_registration'; +}; + +export type SelfRegisterUserResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type SelfRegisterUserResponse = SelfRegisterUserResponses[keyof SelfRegisterUserResponses]; + +export type ShareBrandconfigThemeData = { + body: { + /** + * MD5 of brand_config to share + */ + 'shared_brand_config[brand_config_md5]': string; + /** + * Name to share this BrandConfig (theme) as. + */ + 'shared_brand_config[name]': string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/shared_brand_configs'; +}; + +export type ShareBrandconfigThemeResponses = { + /** + * No response was specified + */ + 200: SharedBrandConfig; +}; + +export type ShareBrandconfigThemeResponse = ShareBrandconfigThemeResponses[keyof ShareBrandconfigThemeResponses]; + +export type UpdateSharedThemeData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/shared_brand_configs/{id}'; +}; + +export type UpdateSharedThemeResponses = { + /** + * No response was specified + */ + 200: SharedBrandConfig; +}; + +export type UpdateSharedThemeResponse = UpdateSharedThemeResponses[keyof UpdateSharedThemeResponses]; + +export type GetSisImportErrorListSisImportErrorsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sis_import_errors'; +}; + +export type GetSisImportErrorListSisImportErrorsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetSisImportErrorListSisImportErrorsResponse = GetSisImportErrorListSisImportErrorsResponses[keyof GetSisImportErrorListSisImportErrorsResponses]; + +export type GetSisImportListData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * If set, only shows imports created after the specified date (use ISO8601 format) + */ + created_since?: string; + }; + url: '/v1/accounts/{account_id}/sis_imports'; +}; + +export type GetSisImportListResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetSisImportListResponse = GetSisImportListResponses[keyof GetSisImportListResponses]; + +export type ImportSisDataData = { + body?: { + /** + * This option, if present, will process all changes as if they were UI + * changes. This means that "stickiness" will be added to changed fields. + * This option is only processed if 'override_sis_stickiness' is also provided. + */ + add_sis_stickiness?: boolean; + /** + * There are two ways to post SIS import data - either via a + * application/x-www-form-urlencoded form-field-style attachment, or via a non-multipart + * raw post request. + * + * 'attachment' is required for application/x-www-form-urlencoded style posts. Assumed to + * be SIS data from a file upload form field named 'attachment'. + * + * Examples: + * curl -F attachment=@ -H "Authorization: Bearer " \ + * https:///api/v1/accounts//sis_imports.json?import_type=instructure_csv + * + * If you decide to do a raw post, you can skip the 'attachment' argument, + * but you will then be required to provide a suitable Content-Type header. + * You are encouraged to also provide the 'extension' argument. + * + * Examples: + * curl -H 'Content-Type: application/octet-stream' --data-binary @.zip \ + * -H "Authorization: Bearer " \ + * https:///api/v1/accounts//sis_imports.json?import_type=instructure_csv&extension=zip + * + * curl -H 'Content-Type: application/zip' --data-binary @.zip \ + * -H "Authorization: Bearer " \ + * https:///api/v1/accounts//sis_imports.json?import_type=instructure_csv + * + * curl -H 'Content-Type: text/csv' --data-binary @.csv \ + * -H "Authorization: Bearer " \ + * https:///api/v1/accounts//sis_imports.json?import_type=instructure_csv + * + * curl -H 'Content-Type: text/csv' --data-binary @.csv \ + * -H "Authorization: Bearer " \ + * https:///api/v1/accounts//sis_imports.json?import_type=instructure_csv&batch_mode=1&batch_mode_term_id=15 + */ + attachment?: string; + /** + * If set, this SIS import will be run in batch mode, deleting any data + * previously imported via SIS that is not present in this latest import. + * See the SIS CSV Format page for details. + * Batch mode cannot be used with diffing. + */ + batch_mode?: boolean; + /** + * Limit deletions to only this term. Required if batch mode is enabled. + */ + batch_mode_term_id?: string; + /** + * If set with batch_mode, the batch cleanup process will not run if the + * number of items deleted is higher than the percentage set. If set to 10 + * and a term has 200 enrollments, and batch would delete more than 20 of + * the enrollments the batch will abort before the enrollments are deleted. + * The change_threshold will be evaluated for course, sections, and + * enrollments independently. + * If set with diffing, diffing will not be performed if the files are + * greater than the threshold as a percent. If set to 5 and the file is more + * than 5% smaller or more than 5% larger than the file that is being + * compared to, diffing will not be performed. If the files are less than 5%, + * diffing will be performed. See the SIS CSV Format documentation for more + * details. + * Required for multi_term_batch_mode. + */ + change_threshold?: number; + /** + * This option, if present, will clear "stickiness" from all fields touched + * by this import. Requires that 'override_sis_stickiness' is also provided. + * If 'add_sis_stickiness' is also provided, 'clear_sis_stickiness' will + * overrule the behavior of 'add_sis_stickiness' + */ + clear_sis_stickiness?: boolean; + /** + * If set on a CSV import, Canvas will attempt to optimize the SIS import by + * comparing this set of CSVs to the previous set that has the same data set + * identifier, and only applying the difference between the two. See the + * SIS CSV Format documentation for more details. + * Diffing cannot be used with batch_mode + */ + diffing_data_set_identifier?: string; + /** + * If diffing_drop_status is passed, this SIS import will use this status for + * enrollments that are not included in the sis_batch. Defaults to 'deleted' + */ + diffing_drop_status?: 'deleted' | 'completed' | 'inactive'; + /** + * If true, and diffing_data_set_identifier is sent, this SIS import will be + * part of the data set, but diffing will not be performed. See the SIS CSV + * Format documentation for details. + */ + diffing_remaster_data_set?: boolean; + /** + * Recommended for raw post request style imports. This field will be used to + * distinguish between zip, xml, csv, and other file format extensions that + * would usually be provided with the filename in the multipart post request + * scenario. If not provided, this value will be inferred from the + * Content-Type, falling back to zip-file format if all else fails. + */ + extension?: string; + /** + * Choose the data format for reading SIS data. With a standard Canvas + * install, this option can only be 'instructure_csv', and if unprovided, + * will be assumed to be so. Can be part of the query string. + */ + import_type?: string; + /** + * Runs batch mode against all terms in terms file. Requires change_threshold. + */ + multi_term_batch_mode?: boolean; + /** + * Many fields on records in Canvas can be marked "sticky," which means that + * when something changes in the UI apart from the SIS, that field gets + * "stuck." In this way, by default, SIS imports do not override UI changes. + * If this field is present, however, it will tell the SIS import to ignore + * "stickiness" and override all fields. + */ + override_sis_stickiness?: boolean; + /** + * When set the import will skip any deletes. This does not account for + * objects that are deleted during the batch mode cleanup process. + */ + skip_deletes?: boolean; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sis_imports'; +}; + +export type ImportSisDataResponses = { + /** + * No response was specified + */ + 200: SisImport; +}; + +export type ImportSisDataResponse = ImportSisDataResponses[keyof ImportSisDataResponses]; + +export type AbortAllPendingSisImportsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sis_imports/abort_all_pending'; +}; + +export type AbortAllPendingSisImportsResponses = { + /** + * No response was specified + */ + 200: boolean; +}; + +export type AbortAllPendingSisImportsResponse = AbortAllPendingSisImportsResponses[keyof AbortAllPendingSisImportsResponses]; + +export type GetSisImportStatusData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sis_imports/{id}'; +}; + +export type GetSisImportStatusResponses = { + /** + * No response was specified + */ + 200: SisImport; +}; + +export type GetSisImportStatusResponse = GetSisImportStatusResponses[keyof GetSisImportStatusResponses]; + +export type AbortSisImportData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sis_imports/{id}/abort'; +}; + +export type AbortSisImportResponses = { + /** + * No response was specified + */ + 200: SisImport; +}; + +export type AbortSisImportResponse = AbortSisImportResponses[keyof AbortSisImportResponses]; + +export type GetSisImportErrorListSisImportsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sis_imports/{id}/errors'; +}; + +export type GetSisImportErrorListSisImportsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetSisImportErrorListSisImportsResponse = GetSisImportErrorListSisImportsResponses[keyof GetSisImportErrorListSisImportsResponses]; + +export type RestoreWorkflowStatesOfSisImportedItemsData = { + body?: { + /** + * If set, will only restore items that were deleted from batch_mode. + */ + batch_mode?: boolean; + /** + * If set, will only restore enrollments that were concluded. This will + * ignore any items that were created or deleted. + */ + unconclude_only?: boolean; + /** + * If set, will only restore items that were deleted. This will ignore any + * items that were created or modified. + */ + undelete_only?: boolean; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sis_imports/{id}/restore_states'; +}; + +export type RestoreWorkflowStatesOfSisImportedItemsResponses = { + /** + * No response was specified + */ + 200: Progress; +}; + +export type RestoreWorkflowStatesOfSisImportedItemsResponse = RestoreWorkflowStatesOfSisImportedItemsResponses[keyof RestoreWorkflowStatesOfSisImportedItemsResponses]; + +export type ShowAccountAuthSettingsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sso_settings'; +}; + +export type ShowAccountAuthSettingsResponses = { + /** + * No response was specified + */ + 200: SsoSettings; +}; + +export type ShowAccountAuthSettingsResponse = ShowAccountAuthSettingsResponses[keyof ShowAccountAuthSettingsResponses]; + +export type UpdateAccountAuthSettingsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sso_settings'; +}; + +export type UpdateAccountAuthSettingsResponses = { + /** + * No response was specified + */ + 200: SsoSettings; +}; + +export type UpdateAccountAuthSettingsResponse = UpdateAccountAuthSettingsResponses[keyof UpdateAccountAuthSettingsResponses]; + +export type GetSubAccountsOfAccountData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * If true, the entire account tree underneath + * this account will be returned (though still paginated). If false, only + * direct sub-accounts of this account will be returned. Defaults to false. + */ + recursive?: boolean; + }; + url: '/v1/accounts/{account_id}/sub_accounts'; +}; + +export type GetSubAccountsOfAccountResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetSubAccountsOfAccountResponse = GetSubAccountsOfAccountResponses[keyof GetSubAccountsOfAccountResponses]; + +export type CreateNewSubAccountData = { + body: { + /** + * The default group storage quota to be used, if not otherwise specified. + */ + 'account[default_group_storage_quota_mb]'?: number; + /** + * The default course storage quota to be used, if not otherwise specified. + */ + 'account[default_storage_quota_mb]'?: number; + /** + * The default user storage quota to be used, if not otherwise specified. + */ + 'account[default_user_storage_quota_mb]'?: number; + /** + * The name of the new sub-account. + */ + 'account[name]': string; + /** + * The account's identifier in the Student Information System. + */ + 'account[sis_account_id]'?: string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sub_accounts'; +}; + +export type CreateNewSubAccountResponses = { + /** + * No response was specified + */ + 200: Account; +}; + +export type CreateNewSubAccountResponse = CreateNewSubAccountResponses[keyof CreateNewSubAccountResponses]; + +export type DeleteSubAccountData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/sub_accounts/{id}'; +}; + +export type DeleteSubAccountResponses = { + /** + * No response was specified + */ + 200: Account; +}; + +export type DeleteSubAccountResponse = DeleteSubAccountResponses[keyof DeleteSubAccountResponses]; + +export type ListEnrollmentTermsData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + /** + * If set, only returns terms that are in the given state. + * Defaults to 'active'. + */ + workflow_state?: 'active' | 'deleted' | 'all'; + /** + * Array of additional information to include. + * + * "overrides":: term start/end dates overridden for different enrollment types + */ + include?: 'overrides'; + }; + url: '/v1/accounts/{account_id}/terms'; +}; + +export type ListEnrollmentTermsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListEnrollmentTermsResponse = ListEnrollmentTermsResponses[keyof ListEnrollmentTermsResponses]; + +export type CreateEnrollmentTermData = { + body?: { + /** + * The day/time the term ends. + * Accepts times in ISO 8601 format, e.g. 2015-01-10T18:48:00Z. + */ + 'enrollment_term[end_at]'?: string; + /** + * The name of the term. + */ + 'enrollment_term[name]'?: string; + /** + * The day/time the term ends, overridden for the given enrollment type. + * *enrollment_type* can be one of StudentEnrollment, TeacherEnrollment, TaEnrollment, or DesignerEnrollment + */ + 'enrollment_term[overrides][enrollment_type][end_at]'?: string; + /** + * The day/time the term starts, overridden for the given enrollment type. + * *enrollment_type* can be one of StudentEnrollment, TeacherEnrollment, TaEnrollment, or DesignerEnrollment + */ + 'enrollment_term[overrides][enrollment_type][start_at]'?: string; + /** + * The unique SIS identifier for the term. + */ + 'enrollment_term[sis_term_id]'?: string; + /** + * The day/time the term starts. + * Accepts times in ISO 8601 format, e.g. 2015-01-10T18:48:00Z. + */ + 'enrollment_term[start_at]'?: string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/terms'; +}; + +export type CreateEnrollmentTermResponses = { + /** + * No response was specified + */ + 200: EnrollmentTerm; +}; + +export type CreateEnrollmentTermResponse = CreateEnrollmentTermResponses[keyof CreateEnrollmentTermResponses]; + +export type DeleteEnrollmentTermData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/terms/{id}'; +}; + +export type DeleteEnrollmentTermResponses = { + /** + * No response was specified + */ + 200: EnrollmentTerm; +}; + +export type DeleteEnrollmentTermResponse = DeleteEnrollmentTermResponses[keyof DeleteEnrollmentTermResponses]; + +export type UpdateEnrollmentTermData = { + body?: { + /** + * The day/time the term ends. + * Accepts times in ISO 8601 format, e.g. 2015-01-10T18:48:00Z. + */ + 'enrollment_term[end_at]'?: string; + /** + * The name of the term. + */ + 'enrollment_term[name]'?: string; + /** + * The day/time the term ends, overridden for the given enrollment type. + * *enrollment_type* can be one of StudentEnrollment, TeacherEnrollment, TaEnrollment, or DesignerEnrollment + */ + 'enrollment_term[overrides][enrollment_type][end_at]'?: string; + /** + * The day/time the term starts, overridden for the given enrollment type. + * *enrollment_type* can be one of StudentEnrollment, TeacherEnrollment, TaEnrollment, or DesignerEnrollment + */ + 'enrollment_term[overrides][enrollment_type][start_at]'?: string; + /** + * The unique SIS identifier for the term. + */ + 'enrollment_term[sis_term_id]'?: string; + /** + * The day/time the term starts. + * Accepts times in ISO 8601 format, e.g. 2015-01-10T18:48:00Z. + */ + 'enrollment_term[start_at]'?: string; + }; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/terms/{id}'; +}; + +export type UpdateEnrollmentTermResponses = { + /** + * No response was specified + */ + 200: EnrollmentTerm; +}; + +export type UpdateEnrollmentTermResponse = UpdateEnrollmentTermResponses[keyof UpdateEnrollmentTermResponses]; + +export type GetTermsOfServiceData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/terms_of_service'; +}; + +export type GetTermsOfServiceResponses = { + /** + * No response was specified + */ + 200: TermsOfService; +}; + +export type GetTermsOfServiceResponse = GetTermsOfServiceResponses[keyof GetTermsOfServiceResponses]; + +export type ListUsersInAccountData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The partial name or full ID of the users to match and return in the + * results list. Must be at least 3 characters. + * + * Note that the API will prefer matching on canonical user ID if the ID has + * a numeric form. It will only search against other fields if non-numeric + * in form, or if the numeric value doesn't yield any matches. Queries by + * administrative users will search on SIS ID, login ID, name, or email + * address; non-administrative queries will only be compared against name. + */ + search_term?: string; + /** + * The column to sort results by. + */ + sort?: 'username' | 'email' | 'sis_id' | 'last_login'; + /** + * The order to sort the given column by. + */ + order?: 'asc' | 'desc'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/accounts/{account_id}/users'; +}; + +export type ListUsersInAccountResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListUsersInAccountResponse = ListUsersInAccountResponses[keyof ListUsersInAccountResponses]; + +export type CreateUserData = { + body: { + /** + * The communication channel address, e.g. the user's email address. + */ + 'communication_channel[address]'?: string; + /** + * Only valid for account admins. If true, returns the new user account + * confirmation URL in the response. + */ + 'communication_channel[confirmation_url]'?: boolean; + /** + * Only valid for site admins and account admins making requests; If true, the channel is + * automatically validated and no confirmation email or SMS is sent. + * Otherwise, the user must respond to a confirmation message to confirm the + * channel. + * + * If this is true, it is recommended to set "pseudonym[send_confirmation]" to true as well. + * Otherwise, the user will not receive any messages about their account creation. + */ + 'communication_channel[skip_confirmation]'?: boolean; + /** + * The communication channel type, e.g. 'email' or 'sms'. + */ + 'communication_channel[type]'?: string; + /** + * If you're setting the password for the newly created user, you can provide this param + * with a valid URL pointing into this Canvas installation, and the response will include + * a destination field that's a URL that you can redirect a browser to and have the newly + * created user automatically logged in. The URL is only valid for a short time, and must + * match the domain this request is directed to, and be for a well-formed path that Canvas + * can recognize. + */ + destination?: unknown; + /** + * When true, will first try to re-activate a deleted user with matching sis_user_id if possible. + */ + enable_sis_reactivation?: boolean; + /** + * If true, validations are performed on the newly created user (and their associated pseudonym) + * even if the request is made by a privileged user like an admin. When set to false, + * or not included in the request parameters, any newly created users are subject to + * validations unless the request is made by a user with a 'manage_user_logins' right. + * In which case, certain validations such as 'require_acceptance_of_terms' and + * 'require_presence_of_name' are not enforced. Use this parameter to return helpful json + * errors while building users with an admin request. + */ + force_validations?: boolean; + /** + * The authentication provider this login is associated with. Logins + * associated with a specific provider can only be used with that provider. + * Legacy providers (LDAP, CAS, SAML) will search for logins associated with + * them, or unassociated logins. New providers will only search for logins + * explicitly associated with them. This can be the integer ID of the + * provider, or the type of the provider (in which case, it will find the + * first matching provider). + */ + 'pseudonym[authentication_provider_id]'?: string; + /** + * Send user a self-registration style email if true. + * Setting it means the users will get a notification asking them + * to "complete the registration process" by clicking it, setting + * a password, and letting them in. Will only be executed on + * if the user does not need admin approval. + * Defaults to false unless explicitly provided. + */ + 'pseudonym[force_self_registration]'?: boolean; + /** + * Integration ID for the login. To set this parameter, the caller must be able to + * manage SIS permissions. The Integration ID is a secondary + * identifier useful for more complex SIS integrations. + */ + 'pseudonym[integration_id]'?: string; + /** + * User's password. Cannot be set during self-registration. + */ + 'pseudonym[password]'?: string; + /** + * Send user notification of account creation if true. + * Automatically set to true during self-registration. + */ + 'pseudonym[send_confirmation]'?: boolean; + /** + * SIS ID for the user's account. To set this parameter, the caller must be + * able to manage SIS permissions. + */ + 'pseudonym[sis_user_id]'?: string; + /** + * User's login ID. If this is a self-registration, it must be a valid + * email address. + */ + 'pseudonym[unique_id]': string; + /** + * The user's birth date. + */ + 'user[birthdate]'?: string; + /** + * The user's preferred language, from the list of languages Canvas supports. + * This is in RFC-5646 format. + */ + 'user[locale]'?: string; + /** + * The full name of the user. This name will be used by teacher for grading. + * Required if this is a self-registration. + */ + 'user[name]'?: string; + /** + * User's name as it will be displayed in discussions, messages, and comments. + */ + 'user[short_name]'?: string; + /** + * Automatically mark the user as registered. + * + * If this is true, it is recommended to set "pseudonym[send_confirmation]" to true as well. + * Otherwise, the user will not receive any messages about their account creation. + * + * The users communication channel confirmation can be skipped by setting + * "communication_channel[skip_confirmation]" to true as well. + */ + 'user[skip_registration]'?: boolean; + /** + * User's name as used to sort alphabetically in lists. + */ + 'user[sortable_name]'?: string; + /** + * Whether the user accepts the terms of use. Required if this is a + * self-registration and this canvas instance requires users to accept + * the terms (on by default). + * + * If this is true, it will mark the user as having accepted the terms of use. + */ + 'user[terms_of_use]'?: boolean; + /** + * The time zone for the user. Allowed time zones are + * {http://www.iana.org/time-zones IANA time zones} or friendlier + * {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. + */ + 'user[time_zone]'?: string; + }; + path: { + /** + * ID + */ + account_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/users'; +}; + +export type CreateUserResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses]; + +export type DeleteUserFromRootAccountData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/accounts/{account_id}/users/{user_id}'; +}; + +export type DeleteUserFromRootAccountResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type DeleteUserFromRootAccountResponse = DeleteUserFromRootAccountResponses[keyof DeleteUserFromRootAccountResponses]; + +export type GetSingleAccountData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{id}'; +}; + +export type GetSingleAccountResponses = { + /** + * No response was specified + */ + 200: Account; +}; + +export type GetSingleAccountResponse = GetSingleAccountResponses[keyof GetSingleAccountResponses]; + +export type UpdateAccountData = { + body?: { + /** + * The default group storage quota to be used, if not otherwise specified. + */ + 'account[default_group_storage_quota_mb]'?: number; + /** + * The default course storage quota to be used, if not otherwise specified. + */ + 'account[default_storage_quota_mb]'?: number; + /** + * The default time zone of the account. Allowed time zones are + * {http://www.iana.org/time-zones IANA time zones} or friendlier + * {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. + */ + 'account[default_time_zone]'?: string; + /** + * The default user storage quota to be used, if not otherwise specified. + */ + 'account[default_user_storage_quota_mb]'?: number; + /** + * Updates the account name + */ + 'account[name]'?: string; + /** + * Give this a set of keys and boolean values to enable or disable services matching the keys + */ + 'account[services]'?: unknown; + /** + * Lock this setting for sub-accounts and courses + */ + 'account[settings][lock_all_announcements][locked]'?: boolean; + /** + * Disable comments on announcements + */ + 'account[settings][lock_all_announcements][value]'?: boolean; + /** + * Lock this setting for sub-accounts and courses + */ + 'account[settings][restrict_student_future_listing][locked]'?: boolean; + /** + * Restrict students from viewing future enrollments in course list + */ + 'account[settings][restrict_student_future_listing][value]'?: boolean; + /** + * Lock this setting for sub-accounts and courses + */ + 'account[settings][restrict_student_future_view][locked]'?: boolean; + /** + * Restrict students from viewing courses before start date + */ + 'account[settings][restrict_student_future_view][value]'?: boolean; + /** + * Lock this setting for sub-accounts and courses + */ + 'account[settings][restrict_student_past_view][locked]'?: boolean; + /** + * Restrict students from viewing courses after end date + */ + 'account[settings][restrict_student_past_view][value]'?: boolean; + /** + * Updates the account sis_account_id + * Must have manage_sis permission and must not be a root_account. + */ + 'account[sis_account_id]'?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/accounts/{id}'; +}; + +export type UpdateAccountResponses = { + /** + * No response was specified + */ + 200: Account; +}; + +export type UpdateAccountResponse = UpdateAccountResponses[keyof UpdateAccountResponses]; + +export type ListAnnouncementsData = { + body?: never; + path?: never; + query: { + /** + * List of context_codes to retrieve announcements for (for example, +course_123+). Only courses + * are presently supported. The call will fail unless the caller has View Announcements permission + * in all listed courses. + */ + context_codes: Array; + /** + * Only return announcements posted since the start_date (inclusive). + * Defaults to 14 days ago. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + */ + start_date?: string; + /** + * Only return announcements posted before the end_date (inclusive). + * Defaults to 28 days from start_date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + * Announcements scheduled for future posting will only be returned to course administrators. + */ + end_date?: string; + /** + * Only return active announcements that have been published. + * Applies only to requesting users that have permission to view + * unpublished items. + * Defaults to false for users with access to view unpublished items, + * otherwise true and unmodifiable. + */ + active_only?: boolean; + /** + * Optional list of resources to include with the response. May include + * a string of the name of the resource. Possible values are: + * "sections", "sections_user_count" + * if "sections" is passed, includes the course sections that are associated + * with the topic, if the topic is specific to sertain sections of the course. + * If "sections_user_count" is passed, then: + * (a) If sections were asked for *and* the topic is specific to certain + * course sections sections, includes the number of users in each + * section. (as part of the section json asked for above) + * (b) Else, includes at the root level the total number of users in the + * topic's context (group or course) that the topic applies to. + */ + include?: Array; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/announcements'; +}; + +export type ListAnnouncementsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAnnouncementsResponse = ListAnnouncementsResponses[keyof ListAnnouncementsResponses]; + +export type ListAppointmentGroupsData = { + body?: never; + path?: never; + query?: { + /** + * Defaults to "reservable" + */ + scope?: 'reservable' | 'manageable'; + /** + * Array of context codes used to limit returned results. + */ + context_codes?: Array; + /** + * Defaults to false. If true, includes past appointment groups + */ + include_past_appointments?: boolean; + /** + * Array of additional information to include. + * + * "appointments":: calendar event time slots for this appointment group + * "child_events":: reservations of those time slots + * "participant_count":: number of reservations + * "reserved_times":: the event id, start time and end time of reservations + * the current user has made) + * "all_context_codes":: all context codes associated with this appointment group + */ + include?: 'appointments' | 'child_events' | 'participant_count' | 'reserved_times' | 'all_context_codes'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/appointment_groups'; +}; + +export type ListAppointmentGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateAppointmentGroupData = { + body: { + /** + * Array of context codes (courses, e.g. course_1) this group should be + * linked to (1 or more). Users in the course(s) with appropriate permissions + * will be able to sign up for this appointment group. + */ + 'appointment_group[context_codes]': Array; + /** + * Longer text description of the appointment group. + */ + 'appointment_group[description]'?: string; + /** + * Location address. + */ + 'appointment_group[location_address]'?: string; + /** + * Location name of the appointment group. + */ + 'appointment_group[location_name]'?: string; + /** + * Maximum number of time slots a user may register for. + */ + 'appointment_group[max_appointments_per_participant]'?: number; + /** + * Minimum number of time slots a user must register for. If not set, users + * do not need to sign up for any time slots. + */ + 'appointment_group[min_appointments_per_participant]'?: number; + /** + * Nested array of start time/end time pairs indicating time slots for this + * appointment group. Refer to the example request. + */ + 'appointment_group[new_appointments][X]'?: Array; + /** + * "private":: participants cannot see who has signed up for a particular + * time slot + * "protected":: participants can see who has signed up. Defaults to + * "private". + */ + 'appointment_group[participant_visibility]'?: 'private' | 'protected'; + /** + * Maximum number of participants that may register for each time slot. + * Defaults to null (no limit). + */ + 'appointment_group[participants_per_appointment]'?: number; + /** + * Indicates whether this appointment group should be published (i.e. made + * available for signup). Once published, an appointment group cannot be + * unpublished. Defaults to false. + */ + 'appointment_group[publish]'?: boolean; + /** + * Array of sub context codes (course sections or a single group category) + * this group should be linked to. Used to limit the appointment group to + * particular sections. If a group category is specified, students will sign + * up in groups and the participant_type will be "Group" instead of "User". + */ + 'appointment_group[sub_context_codes]'?: Array; + /** + * Short title for the appointment group. + */ + 'appointment_group[title]': string; + }; + path?: never; + query?: never; + url: '/v1/appointment_groups'; +}; + +export type CreateAppointmentGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetNextAppointmentData = { + body?: never; + path?: never; + query?: { + /** + * List of ids of appointment groups to search. + */ + appointment_group_ids?: Array; + }; + url: '/v1/appointment_groups/next_appointment'; +}; + +export type GetNextAppointmentResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetNextAppointmentResponse = GetNextAppointmentResponses[keyof GetNextAppointmentResponses]; + +export type DeleteAppointmentGroupData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * Reason for deleting/canceling the appointment group. + */ + cancel_reason?: string; + }; + url: '/v1/appointment_groups/{id}'; +}; + +export type DeleteAppointmentGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleAppointmentGroupData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * Array of additional information to include. See include[] argument of + * "List appointment groups" action. + * + * "child_events":: reservations of time slots time slots + * "appointments":: will always be returned + * "all_context_codes":: all context codes associated with this appointment group + */ + include?: 'child_events' | 'appointments' | 'all_context_codes'; + }; + url: '/v1/appointment_groups/{id}'; +}; + +export type GetSingleAppointmentGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateAppointmentGroupData = { + body: { + /** + * Array of context codes (courses, e.g. course_1) this group should be + * linked to (1 or more). Users in the course(s) with appropriate permissions + * will be able to sign up for this appointment group. + */ + 'appointment_group[context_codes]': Array; + /** + * Longer text description of the appointment group. + */ + 'appointment_group[description]'?: string; + /** + * Location address. + */ + 'appointment_group[location_address]'?: string; + /** + * Location name of the appointment group. + */ + 'appointment_group[location_name]'?: string; + /** + * Maximum number of time slots a user may register for. + */ + 'appointment_group[max_appointments_per_participant]'?: number; + /** + * Minimum number of time slots a user must register for. If not set, users + * do not need to sign up for any time slots. + */ + 'appointment_group[min_appointments_per_participant]'?: number; + /** + * Nested array of start time/end time pairs indicating time slots for this + * appointment group. Refer to the example request. + */ + 'appointment_group[new_appointments][X]'?: Array; + /** + * "private":: participants cannot see who has signed up for a particular + * time slot + * "protected":: participants can see who has signed up. Defaults to "private". + */ + 'appointment_group[participant_visibility]'?: 'private' | 'protected'; + /** + * Maximum number of participants that may register for each time slot. + * Defaults to null (no limit). + */ + 'appointment_group[participants_per_appointment]'?: number; + /** + * Indicates whether this appointment group should be published (i.e. made + * available for signup). Once published, an appointment group cannot be + * unpublished. Defaults to false. + */ + 'appointment_group[publish]'?: boolean; + /** + * Array of sub context codes (course sections or a single group category) + * this group should be linked to. Used to limit the appointment group to + * particular sections. If a group category is specified, students will sign + * up in groups and the participant_type will be "Group" instead of "User". + */ + 'appointment_group[sub_context_codes]'?: Array; + /** + * Short title for the appointment group. + */ + 'appointment_group[title]'?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/appointment_groups/{id}'; +}; + +export type UpdateAppointmentGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListStudentGroupParticipantsData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * Limits results to the a given participation status, defaults to "all" + */ + registration_status?: 'all' | 'registered'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/appointment_groups/{id}/groups'; +}; + +export type ListStudentGroupParticipantsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListUserParticipantsData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * Limits results to the a given participation status, defaults to "all" + */ + registration_status?: 'all' | 'registered'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/appointment_groups/{id}/users'; +}; + +export type ListUserParticipantsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type QueryByAccountData = { + body?: never; + path: { + /** + * ID + */ + account_id: string; + }; + query?: { + /** + * The beginning of the time range from which you want events. + * Events are stored for one year. + */ + start_time?: string; + /** + * The end of the time range from which you want events. + */ + end_time?: string; + }; + url: '/v1/audit/authentication/accounts/{account_id}'; +}; + +export type QueryByAccountResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type QueryByLoginData = { + body?: never; + path: { + /** + * ID + */ + login_id: string; + }; + query?: { + /** + * The beginning of the time range from which you want events. + * Events are stored for one year. + */ + start_time?: string; + /** + * The end of the time range from which you want events. + */ + end_time?: string; + }; + url: '/v1/audit/authentication/logins/{login_id}'; +}; + +export type QueryByLoginResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type QueryByUserData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The beginning of the time range from which you want events. + * Events are stored for one year. + */ + start_time?: string; + /** + * The end of the time range from which you want events. + */ + end_time?: string; + }; + url: '/v1/audit/authentication/users/{user_id}'; +}; + +export type QueryByUserResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type QueryByCourseData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The beginning of the time range from which you want events. + */ + start_time?: string; + /** + * The end of the time range from which you want events. + */ + end_time?: string; + }; + url: '/v1/audit/course/courses/{course_id}'; +}; + +export type QueryByCourseResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type QueryByCourseResponse = QueryByCourseResponses[keyof QueryByCourseResponses]; + +export type QueryByAssignmentData = { + body?: never; + path: { + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * The beginning of the time range from which you want events. + */ + start_time?: string; + /** + * The end of the time range from which you want events. + */ + end_time?: string; + }; + url: '/v1/audit/grade_change/assignments/{assignment_id}'; +}; + +export type QueryByAssignmentResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type QueryByAssignmentResponse = QueryByAssignmentResponses[keyof QueryByAssignmentResponses]; + +export type QueryByCourseGradeChangeData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The beginning of the time range from which you want events. + */ + start_time?: string; + /** + * The end of the time range from which you want events. + */ + end_time?: string; + }; + url: '/v1/audit/grade_change/courses/{course_id}'; +}; + +export type QueryByCourseGradeChangeResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type QueryByCourseGradeChangeResponse = QueryByCourseGradeChangeResponses[keyof QueryByCourseGradeChangeResponses]; + +export type QueryByGraderData = { + body?: never; + path: { + /** + * ID + */ + grader_id: string; + }; + query?: { + /** + * The beginning of the time range from which you want events. + */ + start_time?: string; + /** + * The end of the time range from which you want events. + */ + end_time?: string; + }; + url: '/v1/audit/grade_change/graders/{grader_id}'; +}; + +export type QueryByGraderResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type QueryByGraderResponse = QueryByGraderResponses[keyof QueryByGraderResponses]; + +export type QueryByStudentData = { + body?: never; + path: { + /** + * ID + */ + student_id: string; + }; + query?: { + /** + * The beginning of the time range from which you want events. + */ + start_time?: string; + /** + * The end of the time range from which you want events. + */ + end_time?: string; + }; + url: '/v1/audit/grade_change/students/{student_id}'; +}; + +export type QueryByStudentResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type QueryByStudentResponse = QueryByStudentResponses[keyof QueryByStudentResponses]; + +export type GetBrandConfigVariablesThatShouldBeUsedForThisDomainData = { + body?: never; + path?: never; + query?: never; + url: '/v1/brand_variables'; +}; + +export type GetBrandConfigVariablesThatShouldBeUsedForThisDomainResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListCalendarEventsData = { + body?: never; + path?: never; + query?: { + /** + * Defaults to "event" + */ + type?: 'event' | 'assignment'; + /** + * Only return events since the start_date (inclusive). + * Defaults to today. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + */ + start_date?: string; + /** + * Only return events before the end_date (inclusive). + * Defaults to start_date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + * If end_date is the same as start_date, then only events on that day are + * returned. + */ + end_date?: string; + /** + * Defaults to false (dated events only). + * If true, only return undated events and ignore start_date and end_date. + */ + undated?: boolean; + /** + * Defaults to false (uses start_date, end_date, and undated criteria). + * If true, all events are returned, ignoring start_date, end_date, and undated criteria. + */ + all_events?: boolean; + /** + * List of context codes of courses/groups/users whose events you want to see. + * If not specified, defaults to the current user (i.e personal calendar, + * no course/group events). Limited to 10 context codes, additional ones are + * ignored. The format of this field is the context type, followed by an + * underscore, followed by the context id. For example: course_42 + */ + context_codes?: Array; + /** + * Array of attributes to exclude. Possible values are "description", "child_events" and "assignment" + */ + excludes?: Array>; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/calendar_events'; +}; + +export type ListCalendarEventsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListCalendarEventsResponse = ListCalendarEventsResponses[keyof ListCalendarEventsResponses]; + +export type CreateCalendarEventData = { + body: { + /** + * When true event is considered to span the whole day and times are ignored. + */ + 'calendar_event[all_day]'?: boolean; + /** + * Context code(s) corresponding to the section-level start and end time(s). + */ + 'calendar_event[child_event_data][X][context_code]'?: string; + /** + * Section-level end time(s) if this is a course event. + */ + 'calendar_event[child_event_data][X][end_at]'?: string; + /** + * Section-level start time(s) if this is a course event. X can be any + * identifier, provided that it is consistent across the start_at, end_at + * and context_code + */ + 'calendar_event[child_event_data][X][start_at]'?: string; + /** + * Context code of the course/group/user whose calendar this event should be + * added to. + */ + 'calendar_event[context_code]': string; + /** + * Longer HTML description of the event. + */ + 'calendar_event[description]'?: string; + /** + * Defaults to false. If set to `true`, an increasing counter number will be appended to the event title + * when the event is duplicated. (e.g. Event 1, Event 2, Event 3, etc) + */ + 'calendar_event[duplicate][append_iterator]'?: boolean; + /** + * Number of times to copy/duplicate the event. Count cannot exceed 200. + */ + 'calendar_event[duplicate][count]'?: number; + /** + * Defaults to "weekly". The frequency at which to duplicate the event + */ + 'calendar_event[duplicate][frequency]'?: 'daily' | 'weekly' | 'monthly'; + /** + * Defaults to 1 if duplicate `count` is set. The interval between the duplicated events. + */ + 'calendar_event[duplicate][interval]'?: number; + /** + * End date/time of the event. + */ + 'calendar_event[end_at]'?: string; + /** + * Location address + */ + 'calendar_event[location_address]'?: string; + /** + * Location name of the event. + */ + 'calendar_event[location_name]'?: string; + /** + * Start date/time of the event. + */ + 'calendar_event[start_at]'?: string; + /** + * Time zone of the user editing the event. Allowed time zones are + * {http://www.iana.org/time-zones IANA time zones} or friendlier + * {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. + */ + 'calendar_event[time_zone_edited]'?: string; + /** + * Short title for the calendar event. + */ + 'calendar_event[title]'?: string; + }; + path?: never; + query?: never; + url: '/v1/calendar_events'; +}; + +export type CreateCalendarEventResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteCalendarEventData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * Reason for deleting/canceling the event. + */ + cancel_reason?: string; + }; + url: '/v1/calendar_events/{id}'; +}; + +export type DeleteCalendarEventResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleCalendarEventOrAssignmentData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/calendar_events/{id}'; +}; + +export type GetSingleCalendarEventOrAssignmentResponses = { + /** + * No response was specified + */ + 200: CalendarEvent; +}; + +export type GetSingleCalendarEventOrAssignmentResponse = GetSingleCalendarEventOrAssignmentResponses[keyof GetSingleCalendarEventOrAssignmentResponses]; + +export type UpdateCalendarEventData = { + body?: { + /** + * When true event is considered to span the whole day and times are ignored. + */ + 'calendar_event[all_day]'?: boolean; + /** + * Context code(s) corresponding to the section-level start and end time(s). + */ + 'calendar_event[child_event_data][X][context_code]'?: string; + /** + * Section-level end time(s) if this is a course event. + */ + 'calendar_event[child_event_data][X][end_at]'?: string; + /** + * Section-level start time(s) if this is a course event. X can be any + * identifier, provided that it is consistent across the start_at, end_at + * and context_code + */ + 'calendar_event[child_event_data][X][start_at]'?: string; + /** + * Context code of the course/group/user to move this event to. + * Scheduler appointments and events with section-specific times cannot be moved between calendars. + */ + 'calendar_event[context_code]'?: string; + /** + * Longer HTML description of the event. + */ + 'calendar_event[description]'?: string; + /** + * End date/time of the event. + */ + 'calendar_event[end_at]'?: string; + /** + * Location address + */ + 'calendar_event[location_address]'?: string; + /** + * Location name of the event. + */ + 'calendar_event[location_name]'?: string; + /** + * Start date/time of the event. + */ + 'calendar_event[start_at]'?: string; + /** + * Time zone of the user editing the event. Allowed time zones are + * {http://www.iana.org/time-zones IANA time zones} or friendlier + * {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. + */ + 'calendar_event[time_zone_edited]'?: string; + /** + * Short title for the calendar event. + */ + 'calendar_event[title]'?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/calendar_events/{id}'; +}; + +export type UpdateCalendarEventResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ReserveTimeSlotData = { + body?: { + /** + * Defaults to false. If true, cancel any previous reservation(s) for this + * participant and appointment group. + */ + cancel_existing?: boolean; + /** + * Comments to associate with this reservation + */ + comments?: string; + /** + * User or group id for whom you are making the reservation (depends on the + * participant type). Defaults to the current user (or user's candidate group). + */ + participant_id?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/calendar_events/{id}/reservations'; +}; + +export type ReserveTimeSlotResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ReserveTimeSlotParticipantIdData = { + body?: { + /** + * Defaults to false. If true, cancel any previous reservation(s) for this + * participant and appointment group. + */ + cancel_existing?: boolean; + /** + * Comments to associate with this reservation + */ + comments?: string; + }; + path: { + /** + * ID + */ + id: string; + /** + * User or group id for whom you are making the reservation (depends on the + * participant type). Defaults to the current user (or user's candidate group). + */ + participant_id: string; + }; + query?: never; + url: '/v1/calendar_events/{id}/reservations/{participant_id}'; +}; + +export type ReserveTimeSlotParticipantIdResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListMembersOfCollaborationData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * - "collaborator_lti_id": Optional information to include with each member. + * Represents an identifier to be used for the member in an LTI context. + * - "avatar_image_url": Optional information to include with each member. + * The url for the avatar of a collaborator with type 'user'. + */ + include?: 'collaborator_lti_id' | 'avatar_image_url'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/collaborations/{id}/members'; +}; + +export type ListMembersOfCollaborationResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListMembersOfCollaborationResponse = ListMembersOfCollaborationResponses[keyof ListMembersOfCollaborationResponses]; + +export type ListOfCommmessagesForUserData = { + body?: never; + path?: never; + query: { + /** + * The user id for whom you want to retrieve CommMessages + */ + user_id: string; + /** + * The beginning of the time range you want to retrieve message from. + */ + start_time?: string; + /** + * The end of the time range you want to retrieve messages for. + */ + end_time?: string; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/comm_messages'; +}; + +export type ListOfCommmessagesForUserResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListOfCommmessagesForUserResponse = ListOfCommmessagesForUserResponses[keyof ListOfCommmessagesForUserResponses]; + +export type ListConversationsData = { + body?: never; + path?: never; + query?: { + /** + * When set, only return conversations of the specified type. For example, + * set to "unread" to return only conversations that haven't been read. + * The default behavior is to return all non-archived conversations (i.e. + * read and unread). + */ + scope?: 'unread' | 'starred' | 'archived'; + /** + * When set, only return conversations for the specified courses, groups + * or users. The id should be prefixed with its type, e.g. "user_123" or + * "course_456". Can be an array (by setting "filter[]") or single value + * (by setting "filter") + */ + filter?: Array; + /** + * When filter[] contains multiple filters, combine them with this mode, + * filtering conversations that at have at least all of the contexts ("and") + * or at least one of the contexts ("or") + */ + filter_mode?: 'and' | 'or' | 'default or'; + /** + * (Obsolete) Submissions are no + * longer linked to conversations. This parameter is ignored. + */ + interleave_submissions?: boolean; + /** + * Default is false. If true, + * the top-level element of the response will be an object rather than + * an array, and will have the keys "conversations" which will contain the + * paged conversation data, and "conversation_ids" which will contain the + * ids of all conversations under this scope/filter in the same order. + */ + include_all_conversation_ids?: boolean; + /** + * "participant_avatars":: Optionally include an "avatar_url" key for each user participanting in the conversation + */ + include?: 'participant_avatars'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/conversations'; +}; + +export type ListConversationsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListConversationsResponse = ListConversationsResponses[keyof ListConversationsResponses]; + +export type CreateConversationData = { + body: { + /** + * An array of attachments ids. These must be files that have been previously + * uploaded to the sender's "conversation attachments" folder. + */ + attachment_ids?: Array; + /** + * The message to be sent + */ + body: string; + /** + * The course or group that is the context for this conversation. Same format + * as courses or groups in the recipients argument. + */ + context_code?: string; + /** + * Used when generating "visible" in the API response. See the explanation + * under the {api:ConversationsController#index index API action} + */ + filter?: Array; + /** + * Used when generating "visible" in the API response. See the explanation + * under the {api:ConversationsController#index index API action} + */ + filter_mode?: 'and' | 'or' | 'default or'; + /** + * Defaults to false. If true, this will be a group conversation (i.e. all + * recipients may see all messages and replies). If false, individual private + * conversations will be started with each recipient. Must be set false if the + * number of recipients is over the set maximum (default is 100). + */ + group_conversation?: boolean; + /** + * Media comment id of an audio of video file to be associated with this + * message. + */ + media_comment_id?: string; + /** + * Type of the associated media file + */ + media_comment_type?: 'audio' | 'video'; + /** + * Determines whether the messages will be created/sent synchronously or + * asynchronously. Defaults to sync, and this option is ignored if this is a + * group conversation or there is just one recipient (i.e. it must be a bulk + * private message). When sent async, the response will be an empty array + * (batch status can be queried via the {api:ConversationsController#batches batches API}) + */ + mode?: 'sync' | 'async'; + /** + * An array of recipient ids. These may be user ids or course/group ids + * prefixed with "course_" or "group_" respectively, e.g. + * recipients[]=1&recipients[]=2&recipients[]=course_3. If the course/group + * has over 100 enrollments, 'bulk_message' and 'group_conversation' must be + * set to true. + */ + recipients: Array; + /** + * Used when generating "visible" in the API response. See the explanation + * under the {api:ConversationsController#index index API action} + */ + scope?: 'unread' | 'starred' | 'archived'; + /** + * The subject of the conversation. This is ignored when reusing a + * conversation. Maximum length is 255 characters. + */ + subject?: string; + /** + * Will add a faculty journal entry for each recipient as long as the user + * making the api call has permission, the recipient is a student and + * faculty journals are enabled in the account. + */ + user_note?: boolean; + }; + path?: never; + query?: never; + url: '/v1/conversations'; +}; + +export type CreateConversationResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type BatchUpdateConversationsData = { + body: { + /** + * List of conversations to update. Limited to 500 conversations. + */ + conversation_ids: Array; + /** + * The action to take on each conversation. + */ + event: 'mark_as_read' | 'mark_as_unread' | 'star' | 'unstar' | 'archive' | 'destroy'; + }; + path?: never; + query?: never; + url: '/v1/conversations'; +}; + +export type BatchUpdateConversationsResponses = { + /** + * No response was specified + */ + 200: Progress; +}; + +export type BatchUpdateConversationsResponse = BatchUpdateConversationsResponses[keyof BatchUpdateConversationsResponses]; + +export type GetRunningBatchesData = { + body?: never; + path?: never; + query?: never; + url: '/v1/conversations/batches'; +}; + +export type GetRunningBatchesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type FindRecipientsConversationsData = { + body?: never; + path?: never; + query?: { + /** + * Search terms used for matching users/courses/groups (e.g. "bob smith"). If + * multiple terms are given (separated via whitespace), only results matching + * all terms will be returned. + */ + search?: string; + /** + * Limit the search to a particular course/group (e.g. "course_3" or "group_4"). + */ + context?: string; + /** + * Array of ids to exclude from the search. These may be user ids or + * course/group ids prefixed with "course_" or "group_" respectively, + * e.g. exclude[]=1&exclude[]=2&exclude[]=course_3 + */ + exclude?: Array; + /** + * Limit the search just to users or contexts (groups/courses). + */ + type?: 'user' | 'context'; + /** + * Search for a specific user id. This ignores the other above parameters, + * and will never return more than one result. + */ + user_id?: number; + /** + * When searching by user_id, only users that could be normally messaged by + * this user will be returned. This parameter allows you to specify a + * conversation that will be referenced for a shared context -- if both the + * current user and the searched user are in the conversation, the user will + * be returned. This is used to start new side conversations. + */ + from_conversation_id?: number; + /** + * Array of permission strings to be checked for each matched context (e.g. + * "send_messages"). This argument determines which permissions may be + * returned in the response; it won't prevent contexts from being returned if + * they don't grant the permission(s). + */ + permissions?: Array; + }; + url: '/v1/conversations/find_recipients'; +}; + +export type FindRecipientsConversationsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkAllAsReadData = { + body?: never; + path?: never; + query?: never; + url: '/v1/conversations/mark_all_as_read'; +}; + +export type MarkAllAsReadResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UnreadCountData = { + body?: never; + path?: never; + query?: never; + url: '/v1/conversations/unread_count'; +}; + +export type UnreadCountResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteConversationData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/conversations/{id}'; +}; + +export type DeleteConversationResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleConversationData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * (Obsolete) Submissions are no + * longer linked to conversations. This parameter is ignored. + */ + interleave_submissions?: boolean; + /** + * Used when generating "visible" in the API response. See the explanation + * under the {api:ConversationsController#index index API action} + */ + scope?: 'unread' | 'starred' | 'archived'; + /** + * Used when generating "visible" in the API response. See the explanation + * under the {api:ConversationsController#index index API action} + */ + filter?: Array; + /** + * Used when generating "visible" in the API response. See the explanation + * under the {api:ConversationsController#index index API action} + */ + filter_mode?: 'and' | 'or' | 'default or'; + /** + * Default true. If true, unread + * conversations will be automatically marked as read. This will default + * to false in a future API release, so clients should explicitly send + * true if that is the desired behavior. + */ + auto_mark_as_read?: boolean; + }; + url: '/v1/conversations/{id}'; +}; + +export type GetSingleConversationResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type EditConversationData = { + body?: { + /** + * Toggle the starred state of the current user's view of the conversation. + */ + 'conversation[starred]'?: boolean; + /** + * Toggle the current user's subscription to the conversation (only valid for + * group conversations). If unsubscribed, the user will still have access to + * the latest messages, but the conversation won't be automatically flagged + * as unread, nor will it jump to the top of the inbox. + */ + 'conversation[subscribed]'?: boolean; + /** + * Change the state of this conversation + */ + 'conversation[workflow_state]'?: 'read' | 'unread' | 'archived'; + /** + * Used when generating "visible" in the API response. See the explanation + * under the {api:ConversationsController#index index API action} + */ + filter?: Array; + /** + * Used when generating "visible" in the API response. See the explanation + * under the {api:ConversationsController#index index API action} + */ + filter_mode?: 'and' | 'or' | 'default or'; + /** + * Used when generating "visible" in the API response. See the explanation + * under the {api:ConversationsController#index index API action} + */ + scope?: 'unread' | 'starred' | 'archived'; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/conversations/{id}'; +}; + +export type EditConversationResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type AddMessageData = { + body: { + /** + * An array of attachments ids. These must be files that have been previously + * uploaded to the sender's "conversation attachments" folder. + */ + attachment_ids?: Array; + /** + * The message to be sent. + */ + body: string; + /** + * no description + */ + included_messages?: Array; + /** + * Media comment id of an audio of video file to be associated with this + * message. + */ + media_comment_id?: string; + /** + * Type of the associated media file. + */ + media_comment_type?: 'audio' | 'video'; + /** + * no description + */ + recipients?: Array; + /** + * Will add a faculty journal entry for each recipient as long as the user + * making the api call has permission, the recipient is a student and + * faculty journals are enabled in the account. + */ + user_note?: boolean; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/conversations/{id}/add_message'; +}; + +export type AddMessageResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type AddRecipientsData = { + body: { + /** + * An array of recipient ids. These may be user ids or course/group ids + * prefixed with "course_" or "group_" respectively, e.g. + * recipients[]=1&recipients[]=2&recipients[]=course_3 + */ + recipients: Array; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/conversations/{id}/add_recipients'; +}; + +export type AddRecipientsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteMessageData = { + body: { + /** + * Array of message ids to be deleted + */ + remove: Array; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/conversations/{id}/remove_messages'; +}; + +export type DeleteMessageResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListAccountsForCourseAdminsData = { + body?: never; + path?: never; + query?: never; + url: '/v1/course_accounts'; +}; + +export type ListAccountsForCourseAdminsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAccountsForCourseAdminsResponse = ListAccountsForCourseAdminsResponses[keyof ListAccountsForCourseAdminsResponses]; + +export type ListYourCoursesData = { + body?: never; + path?: never; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + /** + * When set, only return courses where the user is enrolled as this type. For + * example, set to "teacher" to return only courses where the user is + * enrolled as a Teacher. This argument is ignored if enrollment_role is given. + */ + enrollment_type?: 'teacher' | 'student' | 'ta' | 'observer' | 'designer'; + /** + * Deprecated + * When set, only return courses where the user is enrolled with the specified + * course-level role. This can be a role created with the + * {api:RoleOverridesController#add_role Add Role API} or a base role type of + * 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'ObserverEnrollment', + * or 'DesignerEnrollment'. + */ + enrollment_role?: string; + /** + * When set, only return courses where the user is enrolled with the specified + * course-level role. This can be a role created with the + * {api:RoleOverridesController#add_role Add Role API} or a built_in role type of + * 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'ObserverEnrollment', + * or 'DesignerEnrollment'. + */ + enrollment_role_id?: number; + /** + * When set, only return courses where the user has an enrollment with the given state. + * This will respect section/course/term date overrides. + */ + enrollment_state?: 'active' | 'invited_or_pending' | 'completed'; + /** + * When set, only return courses that are not configured as blueprint courses. + */ + exclude_blueprint_courses?: boolean; + /** + * - "needs_grading_count": Optional information to include with each Course. + * When needs_grading_count is given, and the current user has grading + * rights, the total number of submissions needing grading for all + * assignments is returned. + * - "syllabus_body": Optional information to include with each Course. + * When syllabus_body is given the user-generated html for the course + * syllabus is returned. + * - "public_description": Optional information to include with each Course. + * When public_description is given the user-generated text for the course + * public description is returned. + * - "total_scores": Optional information to include with each Course. + * When total_scores is given, any student enrollments will also + * include the fields 'computed_current_score', 'computed_final_score', + * 'computed_current_grade', and 'computed_final_grade', as well as (if + * the user has permission) 'unposted_current_score', + * 'unposted_final_score', 'unposted_current_grade', and + * 'unposted_final_grade' (see Enrollment documentation for more + * information on these fields). This argument is ignored if the course is + * configured to hide final grades. + * - "current_grading_period_scores": Optional information to include with + * each Course. When current_grading_period_scores is given and total_scores + * is given, any student enrollments will also include the fields + * 'has_grading_periods', + * 'totals_for_all_grading_periods_option', 'current_grading_period_title', + * 'current_grading_period_id', current_period_computed_current_score', + * 'current_period_computed_final_score', + * 'current_period_computed_current_grade', and + * 'current_period_computed_final_grade', as well as (if the user has permission) + * 'current_period_unposted_current_score', + * 'current_period_unposted_final_score', + * 'current_period_unposted_current_grade', and + * 'current_period_unposted_final_grade' (see Enrollment documentation for + * more information on these fields). In addition, when this argument is + * passed, the course will have a 'has_grading_periods' attribute + * on it. This argument is ignored if the course is configured to hide final + * grades or if the total_scores argument is not included. + * - "term": Optional information to include with each Course. When + * term is given, the information for the enrollment term for each course + * is returned. + * - "account": Optional information to include with each Course. When + * account is given, the account json for each course is returned. + * - "course_progress": Optional information to include with each Course. + * When course_progress is given, each course will include a + * 'course_progress' object with the fields: 'requirement_count', an integer + * specifying the total number of requirements in the course, + * 'requirement_completed_count', an integer specifying the total number of + * requirements in this course that have been completed, and + * 'next_requirement_url', a string url to the next requirement item, and + * 'completed_at', the date the course was completed (null if incomplete). + * 'next_requirement_url' will be null if all requirements have been + * completed or the current module does not require sequential progress. + * "course_progress" will return an error message if the course is not + * module based or the user is not enrolled as a student in the course. + * - "sections": Section enrollment information to include with each Course. + * Returns an array of hashes containing the section ID (id), section name + * (name), start and end dates (start_at, end_at), as well as the enrollment + * type (enrollment_role, e.g. 'StudentEnrollment'). + * - "storage_quota_used_mb": The amount of storage space used by the files in this course + * - "total_students": Optional information to include with each Course. + * Returns an integer for the total amount of active and invited students. + * - "passback_status": Include the grade passback_status + * - "favorites": Optional information to include with each Course. + * Indicates if the user has marked the course as a favorite course. + * - "teachers": Teacher information to include with each Course. + * Returns an array of hashes containing the {api:Users:UserDisplay UserDisplay} information + * for each teacher in the course. + * - "observed_users": Optional information to include with each Course. + * Will include data for observed users if the current user has an + * observer enrollment. + * - "tabs": Optional information to include with each Course. + * Will include the list of tabs configured for each course. See the + * {api:TabsController#index List available tabs API} for more information. + * - "course_image": Optional course image data for when there is a course image + * and the course image feature flag has been enabled + */ + include?: 'needs_grading_count' | 'syllabus_body' | 'public_description' | 'total_scores' | 'current_grading_period_scores' | 'term' | 'account' | 'course_progress' | 'sections' | 'storage_quota_used_mb' | 'total_students' | 'passback_status' | 'favorites' | 'teachers' | 'observed_users' | 'course_image'; + /** + * If set, only return courses that are in the given state(s). + * By default, "available" is returned for students and observers, and + * anything except "deleted", for all other enrollment types + */ + state?: 'unpublished' | 'available' | 'completed' | 'deleted'; + }; + url: '/v1/courses'; +}; + +export type ListYourCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListYourCoursesResponse = ListYourCoursesResponses[keyof ListYourCoursesResponses]; + +export type CourseActivityStreamData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/activity_stream'; +}; + +export type CourseActivityStreamResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CourseActivityStreamSummaryData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/activity_stream/summary'; +}; + +export type CourseActivityStreamSummaryResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetCourseLevelParticipationDataData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/analytics/activity'; +}; + +export type GetCourseLevelParticipationDataResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetCourseLevelAssignmentDataData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * If async is true, then the course_assignments call can happen asynch- + * ronously and MAY return a response containing a progress_url key instead + * of an assignments array. If it does, then it is the caller's + * responsibility to poll the API again to see if the progress is complete. + * If the data is ready (possibly even on the first async call) then it + * will be passed back normally, as documented in the example response. + */ + async?: boolean; + }; + url: '/v1/courses/{course_id}/analytics/assignments'; +}; + +export type GetCourseLevelAssignmentDataResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetCourseLevelStudentSummaryDataData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The order results in which results are returned. Defaults to "name". + */ + sort_column?: 'name' | 'name_descending' | 'score' | 'score_descending' | 'participations' | 'participations_descending' | 'page_views' | 'page_views_descending'; + /** + * If set, returns only the specified student. + */ + student_id?: string; + }; + url: '/v1/courses/{course_id}/analytics/student_summaries'; +}; + +export type GetCourseLevelStudentSummaryDataResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetUserInACourseLevelParticipationDataData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + student_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/analytics/users/{student_id}/activity'; +}; + +export type GetUserInACourseLevelParticipationDataResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetUserInACourseLevelAssignmentDataData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + student_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/analytics/users/{student_id}/assignments'; +}; + +export type GetUserInACourseLevelAssignmentDataResponses = { + /** + * Returns a list of assignments for the course sorted by due date + */ + 200: Array; +}; + +export type GetUserInACourseLevelAssignmentDataResponse = GetUserInACourseLevelAssignmentDataResponses[keyof GetUserInACourseLevelAssignmentDataResponses]; + +export type GetUserInACourseLevelMessagingDataData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + student_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/analytics/users/{student_id}/communication'; +}; + +export type GetUserInACourseLevelMessagingDataResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListAssignmentGroupsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * Associations to include with the group. "discussion_topic", "all_dates" + * "assignment_visibility" & "submission" are only valid if "assignments" is also included. + * The "assignment_visibility" option additionally requires that the Differentiated Assignments course feature be turned on. + */ + include?: 'assignments' | 'discussion_topic' | 'all_dates' | 'assignment_visibility' | 'overrides' | 'submission'; + /** + * If "assignments" are included, those with the specified submission types + * will be excluded from the assignment groups. + */ + exclude_assignment_submission_types?: 'online_quiz' | 'discussion_topic' | 'wiki_page' | 'external_tool'; + /** + * Apply assignment overrides for each assignment, defaults to true. + */ + override_assignment_dates?: boolean; + /** + * The id of the grading period in which assignment groups are being requested + * (Requires grading periods to exist.) + */ + grading_period_id?: number; + /** + * If true, all assignments returned will apply to the current user in the + * specified grading period. If assignments apply to other students in the + * specified grading period, but not the current user, they will not be + * returned. (Requires the grading_period_id argument and grading periods to + * exist. In addition, the current user must be a student.) + */ + scope_assignments_to_student?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/assignment_groups'; +}; + +export type ListAssignmentGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAssignmentGroupsResponse = ListAssignmentGroupsResponses[keyof ListAssignmentGroupsResponses]; + +export type CreateAssignmentGroupData = { + body?: { + /** + * The percent of the total grade that this assignment group represents + */ + group_weight?: number; + /** + * The integration data of the Assignment Group + */ + integration_data?: { + [key: string]: unknown; + }; + /** + * The assignment group's name + */ + name?: string; + /** + * The position of this assignment group in relation to the other assignment groups + */ + position?: number; + /** + * The grading rules that are applied within this assignment group + * See the Assignment Group object definition for format + */ + rules?: string; + /** + * The sis source id of the Assignment Group + */ + sis_source_id?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignment_groups'; +}; + +export type CreateAssignmentGroupResponses = { + /** + * No response was specified + */ + 200: AssignmentGroup; +}; + +export type CreateAssignmentGroupResponse = CreateAssignmentGroupResponses[keyof CreateAssignmentGroupResponses]; + +export type DestroyAssignmentGroupData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_group_id: string; + }; + query?: { + /** + * The ID of an active Assignment Group to which the assignments that are + * currently assigned to the destroyed Assignment Group will be assigned. + * NOTE: If this argument is not provided, any assignments in this Assignment + * Group will be deleted. + */ + move_assignments_to?: number; + }; + url: '/v1/courses/{course_id}/assignment_groups/{assignment_group_id}'; +}; + +export type DestroyAssignmentGroupResponses = { + /** + * No response was specified + */ + 200: AssignmentGroup; +}; + +export type DestroyAssignmentGroupResponse = DestroyAssignmentGroupResponses[keyof DestroyAssignmentGroupResponses]; + +export type GetAssignmentGroupData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_group_id: string; + }; + query?: { + /** + * Associations to include with the group. "discussion_topic" and "assignment_visibility" and "submission" + * are only valid if "assignments" is also included. The "assignment_visibility" option additionally + * requires that the Differentiated Assignments course feature be turned on. + */ + include?: 'assignments' | 'discussion_topic' | 'assignment_visibility' | 'submission'; + /** + * Apply assignment overrides for each assignment, defaults to true. + */ + override_assignment_dates?: boolean; + /** + * The id of the grading period in which assignment groups are being requested + * (Requires grading periods to exist on the account) + */ + grading_period_id?: number; + }; + url: '/v1/courses/{course_id}/assignment_groups/{assignment_group_id}'; +}; + +export type GetAssignmentGroupResponses = { + /** + * No response was specified + */ + 200: AssignmentGroup; +}; + +export type GetAssignmentGroupResponse = GetAssignmentGroupResponses[keyof GetAssignmentGroupResponses]; + +export type EditAssignmentGroupData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_group_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignment_groups/{assignment_group_id}'; +}; + +export type EditAssignmentGroupResponses = { + /** + * No response was specified + */ + 200: AssignmentGroup; +}; + +export type EditAssignmentGroupResponse = EditAssignmentGroupResponses[keyof EditAssignmentGroupResponses]; + +export type ListAssignmentsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * Associations to include with the assignment. The "assignment_visibility" option + * requires that the Differentiated Assignments course feature be turned on. If + * "observed_users" is passed, submissions for observed users will also be included as an array. + */ + include?: 'submission' | 'assignment_visibility' | 'all_dates' | 'overrides' | 'observed_users'; + /** + * The partial title of the assignments to match and return. + */ + search_term?: string; + /** + * Apply assignment overrides for each assignment, defaults to true. + */ + override_assignment_dates?: boolean; + /** + * Split up "needs_grading_count" by sections into the "needs_grading_count_by_section" key, defaults to false + */ + needs_grading_count_by_section?: boolean; + /** + * If included, only return certain assignments depending on due date and submission status. + */ + bucket?: 'past' | 'overdue' | 'undated' | 'ungraded' | 'unsubmitted' | 'upcoming' | 'future'; + /** + * if set, return only assignments specified + */ + assignment_ids?: Array; + /** + * Determines the order of the assignments. Defaults to "position". + */ + order_by?: 'position' | 'name'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/assignments'; +}; + +export type ListAssignmentsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAssignmentsResponse = ListAssignmentsResponses[keyof ListAssignmentsResponses]; + +export type CreateAssignmentData = { + body: { + 'assignment[allowed_extensions]'?: Array; + /** + * The assignment group id to put the assignment in. + * Defaults to the top assignment group in the course. + */ + 'assignment[assignment_group_id]'?: number; + /** + * List of overrides for the assignment. + */ + 'assignment[assignment_overrides]'?: Array; + /** + * Whether peer reviews will be assigned automatically by Canvas or if + * teachers must manually assign peer reviews. Does not apply if peer reviews + * are not enabled. + */ + 'assignment[automatic_peer_reviews]'?: boolean; + /** + * The assignment's description, supports HTML. + */ + 'assignment[description]'?: string; + /** + * The day/time the assignment is due. Must be between the lock dates if there are lock dates. + * Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. + */ + 'assignment[due_at]'?: string; + /** + * Hash of external tool parameters if submission_types is ["external_tool"]. + * See Assignment object definition for format. + */ + 'assignment[external_tool_tag_attributes]'?: string; + /** + * If this is a group assignment, teachers have the options to grade + * students individually. If false, Canvas will apply the assignment's + * score to each member of the group. If true, the teacher can manually + * assign scores to each member of the group. + */ + 'assignment[grade_group_students_individually]'?: number; + /** + * The grading standard id to set for the course. If no value is provided for this argument the current grading_standard will be un-set from this course. + * This will update the grading_type for the course to 'letter_grade' unless it is already 'gpa_scale'. + */ + 'assignment[grading_standard_id]'?: number; + /** + * The strategy used for grading the assignment. + * The assignment defaults to "points" if this field is omitted. + */ + 'assignment[grading_type]'?: 'pass_fail' | 'percent' | 'letter_grade' | 'gpa_scale' | 'points'; + /** + * If present, the assignment will become a group assignment assigned + * to the group. + */ + 'assignment[group_category_id]'?: number; + /** + * Data used for SIS integrations. Requires admin-level token with the "Manage SIS" permission. JSON string required. + */ + 'assignment[integration_data]'?: string; + /** + * Unique ID from third party integrations + */ + 'assignment[integration_id]'?: string; + /** + * The day/time the assignment is locked after. Must be after the due date if there is a due date. + * Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. + */ + 'assignment[lock_at]'?: string; + /** + * Whether this assignment is moderated. + */ + 'assignment[moderated_grading]'?: boolean; + /** + * Whether this assignment is muted. + * A muted assignment does not send change notifications + * and hides grades from students. + * Defaults to false. + */ + 'assignment[muted]'?: boolean; + /** + * The assignment name. + */ + 'assignment[name]': string; + /** + * If true, Canvas will send a notification to students in the class + * notifying them that the content has changed. + */ + 'assignment[notify_of_update]'?: boolean; + /** + * Whether this assignment is counted towards a student's final grade. + */ + 'assignment[omit_from_final_grade]'?: boolean; + /** + * Whether this assignment is only visible to overrides + * (Only useful if 'differentiated assignments' account setting is on) + */ + 'assignment[only_visible_to_overrides]'?: boolean; + /** + * If submission_types does not include external_tool,discussion_topic, + * online_quiz, or on_paper, determines whether or not peer reviews + * will be turned on for the assignment. + */ + 'assignment[peer_reviews]'?: boolean; + /** + * The maximum points possible on the assignment. + */ + 'assignment[points_possible]'?: number; + /** + * The position of this assignment in the group when displaying + * assignment lists. + */ + 'assignment[position]'?: number; + /** + * Whether this assignment is published. + * (Only useful if 'draft state' account setting is on) + * Unpublished assignments are not visible to students. + */ + 'assignment[published]'?: boolean; + /** + * Whether this assignment should use the Quizzes 2 LTI tool. Sets the + * submission type to 'external_tool' and configures the external tool + * attributes to use the Quizzes 2 LTI tool configured for this course. + * Has no effect if no Quizzes 2 LTI tool is configured. + */ + 'assignment[quiz_lti]'?: boolean; + 'assignment[submission_types]'?: 'online_quiz' | 'none' | 'on_paper' | 'discussion_topic' | 'external_tool' | 'online_upload' | 'online_text_entry' | 'online_url' | 'media_recording'; + /** + * Only applies when the Turnitin plugin is enabled for a course and + * the submission_types array includes "online_upload". + * Toggles Turnitin submissions for the assignment. + * Will be ignored if Turnitin is not available for the course. + */ + 'assignment[turnitin_enabled]'?: boolean; + /** + * Settings to send along to turnitin. See Assignment object definition for + * format. + */ + 'assignment[turnitin_settings]'?: string; + /** + * The day/time the assignment is unlocked. Must be before the due date if there is a due date. + * Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. + */ + 'assignment[unlock_at]'?: string; + /** + * Only applies when the VeriCite plugin is enabled for a course and + * the submission_types array includes "online_upload". + * Toggles VeriCite submissions for the assignment. + * Will be ignored if VeriCite is not available for the course. + */ + 'assignment[vericite_enabled]'?: boolean; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments'; +}; + +export type CreateAssignmentResponses = { + /** + * No response was specified + */ + 200: Assignment; +}; + +export type CreateAssignmentResponse = CreateAssignmentResponses[keyof CreateAssignmentResponses]; + +export type ListMultipleAssignmentsGradeableStudentsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * Assignments being requested + */ + assignment_ids?: Array; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/assignments/gradeable_students'; +}; + +export type ListMultipleAssignmentsGradeableStudentsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type BatchRetrieveOverridesInCourseData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query: { + /** + * Ids of overrides to retrieve + */ + 'assignment_overrides[id]': Array; + /** + * Ids of assignments for each override + */ + 'assignment_overrides[assignment_id]': Array; + }; + url: '/v1/courses/{course_id}/assignments/overrides'; +}; + +export type BatchRetrieveOverridesInCourseResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type BatchRetrieveOverridesInCourseResponse = BatchRetrieveOverridesInCourseResponses[keyof BatchRetrieveOverridesInCourseResponses]; + +export type BatchCreateOverridesInCourseData = { + body: { + /** + * Attributes for the new assignment overrides. + * See {api:AssignmentOverridesController#create Create an assignment override} for available + * attributes + */ + assignment_overrides: Array; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/overrides'; +}; + +export type BatchCreateOverridesInCourseResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type BatchCreateOverridesInCourseResponse = BatchCreateOverridesInCourseResponses[keyof BatchCreateOverridesInCourseResponses]; + +export type BatchUpdateOverridesInCourseData = { + body: { + assignment_overrides: Array; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/overrides'; +}; + +export type BatchUpdateOverridesInCourseResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type BatchUpdateOverridesInCourseResponse = BatchUpdateOverridesInCourseResponses[keyof BatchUpdateOverridesInCourseResponses]; + +export type ShowProvisionalGradeStatusForStudentAnonymousData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * The id of the student to show the status for + */ + anonymous_id?: string; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/anonymous_provisional_grades/status'; +}; + +export type ShowProvisionalGradeStatusForStudentAnonymousResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListGradeableStudentsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * The numeric value leading to the next paginated page. This needs to be parsed from the response header (Link field). + */ + page?: number; + /** + * The number of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/gradeable_students'; +}; + +export type ListGradeableStudentsResponses = { + /** + * Returns a list of UserDisplay objects + */ + 200: Array; +}; + +export type ListGradeableStudentsResponse = ListGradeableStudentsResponses[keyof ListGradeableStudentsResponses]; + +export type ListStudentsSelectedForModerationData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/moderated_students'; +}; + +export type ListStudentsSelectedForModerationResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListStudentsSelectedForModerationResponse = ListStudentsSelectedForModerationResponses[keyof ListStudentsSelectedForModerationResponses]; + +export type SelectStudentsForModerationData = { + body?: { + /** + * user ids for students to select for moderation + */ + student_ids?: Array; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/moderated_students'; +}; + +export type SelectStudentsForModerationResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type SelectStudentsForModerationResponse = SelectStudentsForModerationResponses[keyof SelectStudentsForModerationResponses]; + +export type ListAssignmentOverridesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/overrides'; +}; + +export type ListAssignmentOverridesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAssignmentOverridesResponse = ListAssignmentOverridesResponses[keyof ListAssignmentOverridesResponses]; + +export type CreateAssignmentOverrideData = { + body?: { + /** + * The ID + * of the override's target section. If present, must identify an active + * section of the assignment's course not already targetted by a different + * override. + */ + 'assignment_override[course_section_id]'?: number; + /** + * The day/time + * the overridden assignment is due. Accepts times in ISO 8601 format, e.g. + * 2014-10-21T18:48:00Z. If absent, this override will not affect due date. + * May be present but null to indicate the override removes any previous due + * date. + */ + 'assignment_override[due_at]'?: string; + /** + * The ID of the + * override's target group. If present, the following conditions must be met + * for the override to be successful: + * + * 1. the assignment MUST be a group assignment (a group_category_id is assigned to it) + * 2. the ID must identify an active group in the group set the assignment is in + * 3. the ID must not be targetted by a different override + * + * See {Appendix: Group assignments} for more info. + */ + 'assignment_override[group_id]'?: number; + /** + * The day/time + * the overridden assignment becomes locked. Accepts times in ISO 8601 + * format, e.g. 2014-10-21T18:48:00Z. If absent, this override will not + * affect the lock date. May be present but null to indicate the override + * removes any previous lock date. + */ + 'assignment_override[lock_at]'?: string; + /** + * The IDs of + * the override's target students. If present, the IDs must each identify a + * user with an active student enrollment in the course that is not already + * targetted by a different adhoc override. + */ + 'assignment_override[student_ids]'?: Array; + /** + * The title of the adhoc + * assignment override. Required if student_ids is present, ignored + * otherwise (the title is set to the name of the targetted group or section + * instead). + */ + 'assignment_override[title]'?: string; + /** + * The day/time + * the overridden assignment becomes unlocked. Accepts times in ISO 8601 + * format, e.g. 2014-10-21T18:48:00Z. If absent, this override will not + * affect the unlock date. May be present but null to indicate the override + * removes any previous unlock date. + */ + 'assignment_override[unlock_at]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/overrides'; +}; + +export type CreateAssignmentOverrideResponses = { + /** + * No response was specified + */ + 200: AssignmentOverride; +}; + +export type CreateAssignmentOverrideResponse = CreateAssignmentOverrideResponses[keyof CreateAssignmentOverrideResponses]; + +export type DeleteAssignmentOverrideData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/overrides/{id}'; +}; + +export type DeleteAssignmentOverrideResponses = { + /** + * No response was specified + */ + 200: AssignmentOverride; +}; + +export type DeleteAssignmentOverrideResponse = DeleteAssignmentOverrideResponses[keyof DeleteAssignmentOverrideResponses]; + +export type GetSingleAssignmentOverrideData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/overrides/{id}'; +}; + +export type GetSingleAssignmentOverrideResponses = { + /** + * No response was specified + */ + 200: AssignmentOverride; +}; + +export type GetSingleAssignmentOverrideResponse = GetSingleAssignmentOverrideResponses[keyof GetSingleAssignmentOverrideResponses]; + +export type UpdateAssignmentOverrideData = { + body?: { + /** + * The day/time + * the overridden assignment is due. Accepts times in ISO 8601 format, e.g. + * 2014-10-21T18:48:00Z. If absent, this override will not affect due date. + * May be present but null to indicate the override removes any previous due + * date. + */ + 'assignment_override[due_at]'?: string; + /** + * The day/time + * the overridden assignment becomes locked. Accepts times in ISO 8601 + * format, e.g. 2014-10-21T18:48:00Z. If absent, this override will not + * affect the lock date. May be present but null to indicate the override + * removes any previous lock date. + */ + 'assignment_override[lock_at]'?: string; + /** + * The IDs of the + * override's target students. If present, the IDs must each identify a + * user with an active student enrollment in the course that is not already + * targetted by a different adhoc override. Ignored unless the override + * being updated is adhoc. + */ + 'assignment_override[student_ids]'?: Array; + /** + * The title of an adhoc + * assignment override. Ignored unless the override being updated is adhoc. + */ + 'assignment_override[title]'?: string; + /** + * The day/time + * the overridden assignment becomes unlocked. Accepts times in ISO 8601 + * format, e.g. 2014-10-21T18:48:00Z. If absent, this override will not + * affect the unlock date. May be present but null to indicate the override + * removes any previous unlock date. + */ + 'assignment_override[unlock_at]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/overrides/{id}'; +}; + +export type UpdateAssignmentOverrideResponses = { + /** + * No response was specified + */ + 200: AssignmentOverride; +}; + +export type UpdateAssignmentOverrideResponse = UpdateAssignmentOverrideResponses[keyof UpdateAssignmentOverrideResponses]; + +export type GetAllPeerReviewsCoursesPeerReviewsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * Associations to include with the peer review. + */ + include?: 'submission_comments' | 'user'; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/peer_reviews'; +}; + +export type GetAllPeerReviewsCoursesPeerReviewsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAllPeerReviewsCoursesPeerReviewsResponse = GetAllPeerReviewsCoursesPeerReviewsResponses[keyof GetAllPeerReviewsCoursesPeerReviewsResponses]; + +export type BulkSelectProvisionalGradesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/bulk_select'; +}; + +export type BulkSelectProvisionalGradesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type PublishProvisionalGradesForAssignmentData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/publish'; +}; + +export type PublishProvisionalGradesForAssignmentResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ShowProvisionalGradeStatusForStudentData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * The id of the student to show the status for + */ + student_id?: number; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/status'; +}; + +export type ShowProvisionalGradeStatusForStudentResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CopyProvisionalGradeData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + provisional_grade_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/{provisional_grade_id}/copy_to_final_mark'; +}; + +export type CopyProvisionalGradeResponses = { + /** + * No response was specified + */ + 200: ProvisionalGrade; +}; + +export type CopyProvisionalGradeResponse = CopyProvisionalGradeResponses[keyof CopyProvisionalGradeResponses]; + +export type SelectProvisionalGradeData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + provisional_grade_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/provisional_grades/{provisional_grade_id}/select'; +}; + +export type SelectProvisionalGradeResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SubmissionSummaryCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * If this argument is true, the response will take into account student groups. + */ + grouped?: boolean; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submission_summary'; +}; + +export type SubmissionSummaryCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListAssignmentSubmissionsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * Associations to include with the group. "group" will add group_id and group_name. + */ + include?: 'submission_history' | 'submission_comments' | 'rubric_assessment' | 'assignment' | 'visibility' | 'course' | 'user' | 'group'; + /** + * If this argument is true, the response will be grouped by student groups. + */ + grouped?: boolean; + /** + * The numeric value leading to the next paginated page. This needs to be parsed from the response header (Link field). + */ + page?: number; + /** + * The number of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions'; +}; + +export type ListAssignmentSubmissionsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAssignmentSubmissionsCoursesResponse = ListAssignmentSubmissionsCoursesResponses[keyof ListAssignmentSubmissionsCoursesResponses]; + +export type SubmitAssignmentCoursesData = { + body: { + /** + * Include a textual comment with the submission. + */ + 'comment[text_comment]'?: string; + /** + * Submit the assignment as an HTML document snippet. Note this HTML snippet + * will be sanitized using the same ruleset as a submission made from the + * Canvas web UI. The sanitized HTML will be returned in the response as the + * submission body. Requires a submission_type of "online_text_entry". + */ + 'submission[body]'?: string; + /** + * Submit the assignment as a set of one or more previously uploaded files + * residing in the submitting user's files section (or the group's files + * section, for group assignments). + * + * To upload a new file to submit, see the submissions {api:SubmissionsApiController#create_file Upload a file API}. + * + * Requires a submission_type of "online_upload". + */ + 'submission[file_ids]'?: Array; + /** + * The media comment id to submit. Media comment ids can be submitted via + * this API, however, note that there is not yet an API to generate or list + * existing media comments, so this functionality is currently of limited use. + * + * Requires a submission_type of "media_recording". + */ + 'submission[media_comment_id]'?: string; + /** + * The type of media comment being submitted. + */ + 'submission[media_comment_type]'?: 'audio' | 'video'; + /** + * The type of submission being made. The assignment submission_types must + * include this submission type as an allowed option, or the submission will be rejected with a 400 error. + * + * The submission_type given determines which of the following parameters is + * used. For instance, to submit a URL, submission [submission_type] must be + * set to "online_url", otherwise the submission [url] parameter will be + * ignored. + */ + 'submission[submission_type]': 'online_text_entry' | 'online_url' | 'online_upload' | 'media_recording' | 'basic_lti_launch'; + /** + * Submit the assignment as a URL. The URL scheme must be "http" or "https", + * no "ftp" or other URL schemes are allowed. If no scheme is given (e.g. + * "www.example.com") then "http" will be assumed. Requires a submission_type + * of "online_url" or "basic_lti_launch". + */ + 'submission[url]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions'; +}; + +export type SubmitAssignmentCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GradeOrCommentOnMultipleSubmissionsCoursesAssignmentsData = { + body?: { + /** + * Specifies which assignment to grade. This argument is not necessary when + * using the assignment-specific endpoints. + */ + 'grade_data[student_id][assignment_id]'?: number; + /** + * See documentation for the excuse argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][excuse]'?: boolean; + /** + * See documentation for the comment[] arguments in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][file_ids]'?: Array; + /** + * no description + */ + 'grade_data[student_id][group_comment]'?: boolean; + /** + * no description + */ + 'grade_data[student_id][media_comment_id]'?: string; + /** + * no description + */ + 'grade_data[student_id][media_comment_type]'?: 'audio' | 'video'; + /** + * See documentation for the posted_grade argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][posted_grade]'?: string; + /** + * See documentation for the rubric_assessment argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][rubric_assessment]'?: unknown; + /** + * no description + */ + 'grade_data[student_id][text_comment]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/update_grades'; +}; + +export type GradeOrCommentOnMultipleSubmissionsCoursesAssignmentsResponses = { + /** + * No response was specified + */ + 200: Progress; +}; + +export type GradeOrCommentOnMultipleSubmissionsCoursesAssignmentsResponse = GradeOrCommentOnMultipleSubmissionsCoursesAssignmentsResponses[keyof GradeOrCommentOnMultipleSubmissionsCoursesAssignmentsResponses]; + +export type DeletePeerReviewCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + }; + query: { + /** + * user_id to delete as reviewer on this assignment + */ + user_id: number; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews'; +}; + +export type DeletePeerReviewCoursesResponses = { + /** + * No response was specified + */ + 200: PeerReview; +}; + +export type DeletePeerReviewCoursesResponse = DeletePeerReviewCoursesResponses[keyof DeletePeerReviewCoursesResponses]; + +export type GetAllPeerReviewsCoursesSubmissionsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + }; + query?: { + /** + * Associations to include with the peer review. + */ + include?: 'submission_comments' | 'user'; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews'; +}; + +export type GetAllPeerReviewsCoursesSubmissionsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAllPeerReviewsCoursesSubmissionsResponse = GetAllPeerReviewsCoursesSubmissionsResponses[keyof GetAllPeerReviewsCoursesSubmissionsResponses]; + +export type CreatePeerReviewCoursesData = { + body: { + /** + * user_id to assign as reviewer on this assignment + */ + user_id: number; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews'; +}; + +export type CreatePeerReviewCoursesResponses = { + /** + * No response was specified + */ + 200: PeerReview; +}; + +export type CreatePeerReviewCoursesResponse = CreatePeerReviewCoursesResponses[keyof CreatePeerReviewCoursesResponses]; + +export type GetSingleSubmissionCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * Associations to include with the group. + */ + include?: 'submission_history' | 'submission_comments' | 'rubric_assessment' | 'visibility' | 'course' | 'user'; + }; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}'; +}; + +export type GetSingleSubmissionCoursesResponses = { + /** + * The submission object + */ + 200: Submission; +}; + +export type GetSingleSubmissionCoursesResponse = GetSingleSubmissionCoursesResponses[keyof GetSingleSubmissionCoursesResponses]; + +export type GradeOrCommentOnSubmissionCoursesData = { + body?: { + /** + * Attach files to this comment that were previously uploaded using the + * Submission Comment API's files action + */ + 'comment[file_ids]'?: Array; + /** + * Whether or not this comment should be sent to the entire group (defaults + * to false). Ignored if this is not a group assignment or if no text_comment + * is provided. + */ + 'comment[group_comment]'?: boolean; + /** + * Add an audio/video comment to the submission. Media comments can be added + * via this API, however, note that there is not yet an API to generate or + * list existing media comments, so this functionality is currently of + * limited use. + */ + 'comment[media_comment_id]'?: string; + /** + * The type of media comment being added. + */ + 'comment[media_comment_type]'?: 'audio' | 'video'; + /** + * Add a textual comment to the submission. + */ + 'comment[text_comment]'?: string; + /** + * Whether this assignment is visible to the owner of the submission + */ + 'include[visibility]'?: string; + /** + * Assign a rubric assessment to this assignment submission. The + * sub-parameters here depend on the rubric for the assignment. The general + * format is, for each row in the rubric: + * + * The points awarded for this row. + * rubric_assessment[criterion_id][points] + * + * Comments to add for this row. + * rubric_assessment[criterion_id][comments] + * + * For example, if the assignment rubric is (in JSON format): + * !!!javascript + * [ + * { + * 'id': 'crit1', + * 'points': 10, + * 'description': 'Criterion 1', + * 'ratings': + * [ + * { 'description': 'Good', 'points': 10 }, + * { 'description': 'Poor', 'points': 3 } + * ] + * }, + * { + * 'id': 'crit2', + * 'points': 5, + * 'description': 'Criterion 2', + * 'ratings': + * [ + * { 'description': 'Complete', 'points': 5 }, + * { 'description': 'Incomplete', 'points': 0 } + * ] + * } + * ] + * + * Then a possible set of values for rubric_assessment would be: + * rubric_assessment[crit1][points]=3&rubric_assessment[crit2][points]=5&rubric_assessment[crit2][comments]=Well%20Done. + */ + rubric_assessment?: unknown; + /** + * Sets the "excused" status of an assignment. + */ + 'submission[excuse]'?: boolean; + /** + * Sets the late policy status to either "late", "missing", "none", or null. + */ + 'submission[late_policy_status]'?: string; + /** + * Assign a score to the submission, updating both the "score" and "grade" + * fields on the submission record. This parameter can be passed in a few + * different formats: + * + * points:: A floating point or integral value, such as "13.5". The grade + * will be interpreted directly as the score of the assignment. + * Values above assignment.points_possible are allowed, for awarding + * extra credit. + * percentage:: A floating point value appended with a percent sign, such as + * "40%". The grade will be interpreted as a percentage score on the + * assignment, where 100% == assignment.points_possible. Values above 100% + * are allowed, for awarding extra credit. + * letter grade:: A letter grade, following the assignment's defined letter + * grading scheme. For example, "A-". The resulting score will be the high + * end of the defined range for the letter grade. For instance, if "B" is + * defined as 86% to 84%, a letter grade of "B" will be worth 86%. The + * letter grade will be rejected if the assignment does not have a defined + * letter grading scheme. For more fine-grained control of scores, pass in + * points or percentage rather than the letter grade. + * "pass/complete/fail/incomplete":: A string value of "pass" or "complete" + * will give a score of 100%. "fail" or "incomplete" will give a score of + * 0. + * + * Note that assignments with grading_type of "pass_fail" can only be + * assigned a score of 0 or assignment.points_possible, nothing inbetween. If + * a posted_grade in the "points" or "percentage" format is sent, the grade + * will only be accepted if the grade equals one of those two values. + */ + 'submission[posted_grade]'?: string; + /** + * Sets the seconds late if late policy status is "late" + */ + 'submission[seconds_late_override]'?: number; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}'; +}; + +export type GradeOrCommentOnSubmissionCoursesResponses = { + /** + * The submission on which has been commented. + */ + 200: Submission; +}; + +export type GradeOrCommentOnSubmissionCoursesResponse = GradeOrCommentOnSubmissionCoursesResponses[keyof GradeOrCommentOnSubmissionCoursesResponses]; + +export type UploadFileToSubmissionData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}/comments/files'; +}; + +export type UploadFileToSubmissionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UploadFileCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}/files'; +}; + +export type UploadFileCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkSubmissionAsUnreadCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}/read'; +}; + +export type MarkSubmissionAsUnreadCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkSubmissionAsReadCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{assignment_id}/submissions/{user_id}/read'; +}; + +export type MarkSubmissionAsReadCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteAssignmentData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{id}'; +}; + +export type DeleteAssignmentResponses = { + /** + * No response was specified + */ + 200: Assignment; +}; + +export type DeleteAssignmentResponse = DeleteAssignmentResponses[keyof DeleteAssignmentResponses]; + +export type GetSingleAssignmentData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * Associations to include with the assignment. The "assignment_visibility" option + * requires that the Differentiated Assignments course feature be turned on. If + * "observed_users" is passed, submissions for observed users will also be included. + */ + include?: 'submission' | 'assignment_visibility' | 'overrides' | 'observed_users'; + /** + * Apply assignment overrides to the assignment, defaults to true. + */ + override_assignment_dates?: boolean; + /** + * Split up "needs_grading_count" by sections into the "needs_grading_count_by_section" key, defaults to false + */ + needs_grading_count_by_section?: boolean; + /** + * All dates associated with the assignment, if applicable + */ + all_dates?: boolean; + }; + url: '/v1/courses/{course_id}/assignments/{id}'; +}; + +export type GetSingleAssignmentResponses = { + /** + * No response was specified + */ + 200: Assignment; +}; + +export type GetSingleAssignmentResponse = GetSingleAssignmentResponses[keyof GetSingleAssignmentResponses]; + +export type EditAssignmentData = { + body?: { + /** + * Allowed extensions if submission_types includes "online_upload" + * + * Example: + * allowed_extensions: ["docx","ppt"] + */ + 'assignment[allowed_extensions]'?: Array; + /** + * The assignment group id to put the assignment in. + * Defaults to the top assignment group in the course. + */ + 'assignment[assignment_group_id]'?: number; + /** + * List of overrides for the assignment. + */ + 'assignment[assignment_overrides]'?: Array; + /** + * Whether peer reviews will be assigned automatically by Canvas or if + * teachers must manually assign peer reviews. Does not apply if peer reviews + * are not enabled. + */ + 'assignment[automatic_peer_reviews]'?: boolean; + /** + * The assignment's description, supports HTML. + */ + 'assignment[description]'?: string; + /** + * The day/time the assignment is due. + * Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. + */ + 'assignment[due_at]'?: string; + /** + * Hash of external tool parameters if submission_types is ["external_tool"]. + * See Assignment object definition for format. + */ + 'assignment[external_tool_tag_attributes]'?: string; + /** + * If this is a group assignment, teachers have the options to grade + * students individually. If false, Canvas will apply the assignment's + * score to each member of the group. If true, the teacher can manually + * assign scores to each member of the group. + */ + 'assignment[grade_group_students_individually]'?: number; + /** + * The grading standard id to set for the course. If no value is provided for this argument the current grading_standard will be un-set from this course. + * This will update the grading_type for the course to 'letter_grade' unless it is already 'gpa_scale'. + */ + 'assignment[grading_standard_id]'?: number; + /** + * The strategy used for grading the assignment. + * The assignment defaults to "points" if this field is omitted. + */ + 'assignment[grading_type]'?: 'pass_fail' | 'percent' | 'letter_grade' | 'gpa_scale' | 'points'; + /** + * If present, the assignment will become a group assignment assigned + * to the group. + */ + 'assignment[group_category_id]'?: number; + /** + * Data used for SIS integrations. Requires admin-level token with the "Manage SIS" permission. JSON string required. + */ + 'assignment[integration_data]'?: string; + /** + * Unique ID from third party integrations + */ + 'assignment[integration_id]'?: string; + /** + * The day/time the assignment is locked after. Must be after the due date if there is a due date. + * Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. + */ + 'assignment[lock_at]'?: string; + /** + * Whether this assignment is moderated. + */ + 'assignment[moderated_grading]'?: boolean; + /** + * Whether this assignment is muted. + * A muted assignment does not send change notifications + * and hides grades from students. + * Defaults to false. + */ + 'assignment[muted]'?: boolean; + /** + * The assignment name. + */ + 'assignment[name]'?: string; + /** + * If true, Canvas will send a notification to students in the class + * notifying them that the content has changed. + */ + 'assignment[notify_of_update]'?: boolean; + /** + * Whether this assignment is counted towards a student's final grade. + */ + 'assignment[omit_from_final_grade]'?: boolean; + /** + * Whether this assignment is only visible to overrides + * (Only useful if 'differentiated assignments' account setting is on) + */ + 'assignment[only_visible_to_overrides]'?: boolean; + /** + * If submission_types does not include external_tool,discussion_topic, + * online_quiz, or on_paper, determines whether or not peer reviews + * will be turned on for the assignment. + */ + 'assignment[peer_reviews]'?: boolean; + /** + * The maximum points possible on the assignment. + */ + 'assignment[points_possible]'?: number; + /** + * The position of this assignment in the group when displaying + * assignment lists. + */ + 'assignment[position]'?: number; + /** + * Whether this assignment is published. + * (Only useful if 'draft state' account setting is on) + * Unpublished assignments are not visible to students. + */ + 'assignment[published]'?: boolean; + /** + * List of supported submission types for the assignment. + * Unless the assignment is allowing online submissions, the array should + * only have one element. + * + * If not allowing online submissions, your options are: + * "online_quiz" + * "none" + * "on_paper" + * "discussion_topic" + * "external_tool" + * + * If you are allowing online submissions, you can have one or many + * allowed submission types: + * + * "online_upload" + * "online_text_entry" + * "online_url" + * "media_recording" (Only valid when the Kaltura plugin is enabled) + */ + 'assignment[submission_types]'?: 'online_quiz' | 'none' | 'on_paper' | 'discussion_topic' | 'external_tool' | 'online_upload' | 'online_text_entry' | 'online_url' | 'media_recording'; + /** + * Only applies when the Turnitin plugin is enabled for a course and + * the submission_types array includes "online_upload". + * Toggles Turnitin submissions for the assignment. + * Will be ignored if Turnitin is not available for the course. + */ + 'assignment[turnitin_enabled]'?: boolean; + /** + * Settings to send along to turnitin. See Assignment object definition for + * format. + */ + 'assignment[turnitin_settings]'?: string; + /** + * The day/time the assignment is unlocked. Must be before the due date if there is a due date. + * Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. + */ + 'assignment[unlock_at]'?: string; + /** + * Only applies when the VeriCite plugin is enabled for a course and + * the submission_types array includes "online_upload". + * Toggles VeriCite submissions for the assignment. + * Will be ignored if VeriCite is not available for the course. + */ + 'assignment[vericite_enabled]'?: boolean; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/assignments/{id}'; +}; + +export type EditAssignmentResponses = { + /** + * No response was specified + */ + 200: Assignment; +}; + +export type EditAssignmentResponse = EditAssignmentResponses[keyof EditAssignmentResponses]; + +export type ListBlueprintSubscriptionsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_subscriptions'; +}; + +export type ListBlueprintSubscriptionsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListBlueprintSubscriptionsResponse = ListBlueprintSubscriptionsResponses[keyof ListBlueprintSubscriptionsResponses]; + +export type ListBlueprintImportsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + subscription_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/blueprint_subscriptions/{subscription_id}/migrations'; +}; + +export type ListBlueprintImportsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListBlueprintImportsResponse = ListBlueprintImportsResponses[keyof ListBlueprintImportsResponses]; + +export type ShowBlueprintImportData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + subscription_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_subscriptions/{subscription_id}/migrations/{id}'; +}; + +export type ShowBlueprintImportResponses = { + /** + * No response was specified + */ + 200: BlueprintMigration; +}; + +export type ShowBlueprintImportResponse = ShowBlueprintImportResponses[keyof ShowBlueprintImportResponses]; + +export type GetImportDetailsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + subscription_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_subscriptions/{subscription_id}/migrations/{id}/details'; +}; + +export type GetImportDetailsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetImportDetailsResponse = GetImportDetailsResponses[keyof GetImportDetailsResponses]; + +export type GetBlueprintInformationData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + template_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}'; +}; + +export type GetBlueprintInformationResponses = { + /** + * No response was specified + */ + 200: BlueprintTemplate; +}; + +export type GetBlueprintInformationResponse = GetBlueprintInformationResponses[keyof GetBlueprintInformationResponses]; + +export type GetAssociatedCourseInformationData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + template_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/associated_courses'; +}; + +export type GetAssociatedCourseInformationResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAssociatedCourseInformationResponse = GetAssociatedCourseInformationResponses[keyof GetAssociatedCourseInformationResponses]; + +export type ListBlueprintMigrationsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + template_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations'; +}; + +export type ListBlueprintMigrationsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListBlueprintMigrationsResponse = ListBlueprintMigrationsResponses[keyof ListBlueprintMigrationsResponses]; + +export type BeginMigrationToPushToAssociatedCoursesData = { + body?: { + /** + * An optional comment to be included in the sync history. + */ + comment?: string; + /** + * Whether course settings should be copied over to associated courses. + * Defaults to true for newly associated courses. + */ + copy_settings?: boolean; + /** + * Send a notification to the calling user when the sync completes. + */ + send_notification?: boolean; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + template_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations'; +}; + +export type BeginMigrationToPushToAssociatedCoursesResponses = { + /** + * No response was specified + */ + 200: BlueprintMigration; +}; + +export type BeginMigrationToPushToAssociatedCoursesResponse = BeginMigrationToPushToAssociatedCoursesResponses[keyof BeginMigrationToPushToAssociatedCoursesResponses]; + +export type ShowBlueprintMigrationData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + template_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations/{id}'; +}; + +export type ShowBlueprintMigrationResponses = { + /** + * No response was specified + */ + 200: BlueprintMigration; +}; + +export type ShowBlueprintMigrationResponse = ShowBlueprintMigrationResponses[keyof ShowBlueprintMigrationResponses]; + +export type GetMigrationDetailsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + template_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/migrations/{id}/details'; +}; + +export type GetMigrationDetailsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetMigrationDetailsResponse = GetMigrationDetailsResponses[keyof GetMigrationDetailsResponses]; + +export type SetOrRemoveRestrictionsOnBlueprintCourseObjectData = { + body?: { + /** + * The ID of the object. + */ + content_id?: number; + /** + * The type of the object. + */ + content_type?: 'assignment' | 'attachment' | 'discussion_topic' | 'external_tool' | 'quiz' | 'wiki_page'; + /** + * Whether to apply restrictions. + */ + restricted?: boolean; + /** + * (Optional) If the object is restricted, this specifies a set of restrictions. If not specified, + * the course-level restrictions will be used. See {api:CoursesController#update Course API update documentation} + */ + restrictions?: unknown; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + template_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/restrict_item'; +}; + +export type SetOrRemoveRestrictionsOnBlueprintCourseObjectResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetUnsyncedChangesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + template_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/unsynced_changes'; +}; + +export type GetUnsyncedChangesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetUnsyncedChangesResponse = GetUnsyncedChangesResponses[keyof GetUnsyncedChangesResponses]; + +export type UpdateAssociatedCoursesData = { + body?: { + /** + * Courses to add as associated courses + */ + course_ids_to_add?: Array; + /** + * Courses to remove as associated courses + */ + course_ids_to_remove?: Array; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + template_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/blueprint_templates/{template_id}/update_associations'; +}; + +export type UpdateAssociatedCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetCourseTimetableData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/calendar_events/timetable'; +}; + +export type GetCourseTimetableResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SetCourseTimetableData = { + body?: { + /** + * An array of timetable objects for the course section specified by course_section_id. + * If course_section_id is set to "all", events will be created for the entire course. + */ + 'timetables[course_section_id]'?: Array>; + /** + * Time to end each event at (e.g. "9:00 am") + */ + 'timetables[course_section_id][end_time]'?: Array; + /** + * A location name to set for each event + */ + 'timetables[course_section_id][location_name]'?: Array; + /** + * Time to start each event at (e.g. "9:00 am") + */ + 'timetables[course_section_id][start_time]'?: Array; + /** + * A comma-separated list of abbreviated weekdays + * (Mon-Monday, Tue-Tuesday, Wed-Wednesday, Thu-Thursday, Fri-Friday, Sat-Saturday, Sun-Sunday) + */ + 'timetables[course_section_id][weekdays]'?: Array; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/calendar_events/timetable'; +}; + +export type SetCourseTimetableResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateOrUpdateEventsDirectlyForCourseTimetableData = { + body?: { + /** + * Events will be created for the course section specified by course_section_id. + * If not present, events will be created for the entire course. + */ + course_section_id?: string; + /** + * An array of event objects to use. + */ + events?: Array>; + /** + * A unique identifier that can be used to update the event at a later time + * If one is not specified, an identifier will be generated based on the start and end times + */ + 'events[code]'?: Array; + /** + * End time for the event + */ + 'events[end_at]'?: Array; + /** + * Location name for the event + */ + 'events[location_name]'?: Array; + /** + * Start time for the event + */ + 'events[start_at]'?: Array; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/calendar_events/timetable_events'; +}; + +export type CreateOrUpdateEventsDirectlyForCourseTimetableResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListCollaborationsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/collaborations'; +}; + +export type ListCollaborationsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListCollaborationsCoursesResponse = ListCollaborationsCoursesResponses[keyof ListCollaborationsCoursesResponses]; + +export type ListConferencesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/conferences'; +}; + +export type ListConferencesCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListConferencesCoursesResponse = ListConferencesCoursesResponses[keyof ListConferencesCoursesResponses]; + +export type ListContentExportsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/content_exports'; +}; + +export type ListContentExportsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListContentExportsCoursesResponse = ListContentExportsCoursesResponses[keyof ListContentExportsCoursesResponses]; + +export type ExportContentCoursesData = { + body: { + /** + * "common_cartridge":: Export the contents of the course in the Common Cartridge (.imscc) format + * "qti":: Export quizzes from a course in the QTI format + * "zip":: Export files from a course, group, or user in a zip file + */ + export_type: 'common_cartridge' | 'qti' | 'zip'; + /** + * The select parameter allows exporting specific data. The keys are object types like 'files', + * 'folders', 'pages', etc. The value for each key is a list of object ids. An id can be an + * integer or a string. + * + * Multiple object types can be selected in the same call. However, not all object types are + * valid for every export_type. Common Cartridge supports all object types. Zip and QTI only + * support the object types as described below. + * + * "folders":: Also supported for zip export_type. + * "files":: Also supported for zip export_type. + * "quizzes":: Also supported for qti export_type. + */ + select?: 'folders' | 'files' | 'attachments' | 'quizzes' | 'assignments' | 'announcements' | 'calendar_events' | 'discussion_topics' | 'modules' | 'module_items' | 'pages' | 'rubrics'; + /** + * Don't send the notifications about the export to the user. Default: false + */ + skip_notifications?: boolean; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/content_exports'; +}; + +export type ExportContentCoursesResponses = { + /** + * No response was specified + */ + 200: ContentExport; +}; + +export type ExportContentCoursesResponse = ExportContentCoursesResponses[keyof ExportContentCoursesResponses]; + +export type ShowContentExportCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/content_exports/{id}'; +}; + +export type ShowContentExportCoursesResponses = { + /** + * No response was specified + */ + 200: ContentExport; +}; + +export type ShowContentExportCoursesResponse = ShowContentExportCoursesResponses[keyof ShowContentExportCoursesResponses]; + +export type ListLicensesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/content_licenses'; +}; + +export type ListLicensesCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListLicensesCoursesResponse = ListLicensesCoursesResponses[keyof ListLicensesCoursesResponses]; + +export type ListContentMigrationsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/content_migrations'; +}; + +export type ListContentMigrationsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListContentMigrationsCoursesResponse = ListContentMigrationsCoursesResponses[keyof ListContentMigrationsCoursesResponses]; + +export type CreateContentMigrationCoursesData = { + body: { + /** + * Move anything scheduled for day 'X' to the specified day. (0-Sunday, + * 1-Monday, 2-Tuesday, 3-Wednesday, 4-Thursday, 5-Friday, 6-Saturday) + */ + 'date_shift_options[day_substitutions][X]'?: number; + /** + * The new end date for the source content/course + */ + 'date_shift_options[new_end_date]'?: string; + /** + * The new start date for the content/course + */ + 'date_shift_options[new_start_date]'?: string; + /** + * The original end date of the source content/course + */ + 'date_shift_options[old_end_date]'?: string; + /** + * The original start date of the source content/course + */ + 'date_shift_options[old_start_date]'?: string; + /** + * Whether to remove dates in the copied course. Cannot be used + * in conjunction with *shift_dates*. + */ + 'date_shift_options[remove_dates]'?: boolean; + /** + * Whether to shift dates in the copied course + */ + 'date_shift_options[shift_dates]'?: boolean; + /** + * The type of the migration. Use the + * {api:ContentMigrationsController#available_migrators Migrator} endpoint to + * see all available migrators. Default allowed values: + * canvas_cartridge_importer, common_cartridge_importer, + * course_copy_importer, zip_file_importer, qti_converter, moodle_converter + */ + migration_type: string; + /** + * Required if uploading a file. This is the first step in uploading a file + * to the content migration. See the {file:file_uploads.html File Upload + * Documentation} for details on the file upload workflow. + */ + 'pre_attachment[name]'?: string; + /** + * Other file upload properties, See {file:file_uploads.html File Upload + * Documentation} + */ + 'pre_attachment[todo]'?: string; + /** + * A URL to download the file from. Must not require authentication. + */ + 'settings[file_url]'?: string; + /** + * The folder to unzip the .zip file into for a zip_file_import. + */ + 'settings[folder_id]'?: string; + /** + * Whether to overwrite quizzes with the same identifiers between content + * packages. + */ + 'settings[overwrite_quizzes]'?: boolean; + /** + * The existing question bank ID to import questions into if not specified in + * the content package. + */ + 'settings[question_bank_id]'?: number; + /** + * The question bank to import questions into if not specified in the content + * package, if both bank id and name are set, id will take precedence. + */ + 'settings[question_bank_name]'?: string; + /** + * The course to copy from for a course copy migration. (required if doing + * course copy) + */ + 'settings[source_course_id]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/content_migrations'; +}; + +export type CreateContentMigrationCoursesResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type CreateContentMigrationCoursesResponse = CreateContentMigrationCoursesResponses[keyof CreateContentMigrationCoursesResponses]; + +export type ListMigrationSystemsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/content_migrations/migrators'; +}; + +export type ListMigrationSystemsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListMigrationSystemsCoursesResponse = ListMigrationSystemsCoursesResponses[keyof ListMigrationSystemsCoursesResponses]; + +export type ListMigrationIssuesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + content_migration_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/content_migrations/{content_migration_id}/migration_issues'; +}; + +export type ListMigrationIssuesCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListMigrationIssuesCoursesResponse = ListMigrationIssuesCoursesResponses[keyof ListMigrationIssuesCoursesResponses]; + +export type GetMigrationIssueCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + content_migration_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/content_migrations/{content_migration_id}/migration_issues/{id}'; +}; + +export type GetMigrationIssueCoursesResponses = { + /** + * No response was specified + */ + 200: MigrationIssue; +}; + +export type GetMigrationIssueCoursesResponse = GetMigrationIssueCoursesResponses[keyof GetMigrationIssueCoursesResponses]; + +export type UpdateMigrationIssueCoursesData = { + body: { + /** + * Set the workflow_state of the issue. + */ + workflow_state: 'active' | 'resolved'; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + content_migration_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/content_migrations/{content_migration_id}/migration_issues/{id}'; +}; + +export type UpdateMigrationIssueCoursesResponses = { + /** + * No response was specified + */ + 200: MigrationIssue; +}; + +export type UpdateMigrationIssueCoursesResponse = UpdateMigrationIssueCoursesResponses[keyof UpdateMigrationIssueCoursesResponses]; + +export type GetContentMigrationCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/content_migrations/{id}'; +}; + +export type GetContentMigrationCoursesResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type GetContentMigrationCoursesResponse = GetContentMigrationCoursesResponses[keyof GetContentMigrationCoursesResponses]; + +export type UpdateContentMigrationCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/content_migrations/{id}'; +}; + +export type UpdateContentMigrationCoursesResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type UpdateContentMigrationCoursesResponse = UpdateContentMigrationCoursesResponses[keyof UpdateContentMigrationCoursesResponses]; + +export type CopyCourseContentData = { + body?: { + /** + * A list of the course content types to exclude, all areas not listed will + * be copied. + */ + except?: 'course_settings' | 'assignments' | 'external_tools' | 'files' | 'topics' | 'calendar_events' | 'quizzes' | 'wiki_pages' | 'modules' | 'outcomes'; + /** + * A list of the course content types to copy, all areas not listed will not + * be copied. + */ + only?: 'course_settings' | 'assignments' | 'external_tools' | 'files' | 'topics' | 'calendar_events' | 'quizzes' | 'wiki_pages' | 'modules' | 'outcomes'; + /** + * ID or SIS-ID of the course to copy the content from + */ + source_course?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/course_copy'; +}; + +export type CopyCourseContentResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetCourseCopyStatusData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/course_copy/{id}'; +}; + +export type GetCourseCopyStatusResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type BulkUpdateColumnDataData = { + body: { + /** + * Column content. Setting this to an empty string will delete the data object. + */ + column_data: Array>; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/custom_gradebook_column_data'; +}; + +export type BulkUpdateColumnDataResponses = { + /** + * No response was specified + */ + 200: Progress; +}; + +export type BulkUpdateColumnDataResponse = BulkUpdateColumnDataResponses[keyof BulkUpdateColumnDataResponses]; + +export type ListCustomGradebookColumnsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * Include hidden parameters (defaults to false) + */ + include_hidden?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/custom_gradebook_columns'; +}; + +export type ListCustomGradebookColumnsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListCustomGradebookColumnsResponse = ListCustomGradebookColumnsResponses[keyof ListCustomGradebookColumnsResponses]; + +export type CreateCustomGradebookColumnData = { + body: { + /** + * Hidden columns are not displayed in the gradebook + */ + 'column[hidden]'?: boolean; + /** + * The position of the column relative to other custom columns + */ + 'column[position]'?: number; + /** + * Set this to prevent the column from being editable in the gradebook ui + */ + 'column[read_only]'?: boolean; + /** + * Set this if the column is created by a teacher. The gradebook only + * supports one teacher_notes column. + */ + 'column[teacher_notes]'?: boolean; + /** + * no description + */ + 'column[title]': string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/custom_gradebook_columns'; +}; + +export type CreateCustomGradebookColumnResponses = { + /** + * No response was specified + */ + 200: CustomColumn; +}; + +export type CreateCustomGradebookColumnResponse = CreateCustomGradebookColumnResponses[keyof CreateCustomGradebookColumnResponses]; + +export type ReorderCustomColumnsData = { + body: { + /** + * no description + */ + order: Array; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/custom_gradebook_columns/reorder'; +}; + +export type ReorderCustomColumnsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteCustomGradebookColumnData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/custom_gradebook_columns/{id}'; +}; + +export type DeleteCustomGradebookColumnResponses = { + /** + * No response was specified + */ + 200: CustomColumn; +}; + +export type DeleteCustomGradebookColumnResponse = DeleteCustomGradebookColumnResponses[keyof DeleteCustomGradebookColumnResponses]; + +export type UpdateCustomGradebookColumnData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/custom_gradebook_columns/{id}'; +}; + +export type UpdateCustomGradebookColumnResponses = { + /** + * No response was specified + */ + 200: CustomColumn; +}; + +export type UpdateCustomGradebookColumnResponse = UpdateCustomGradebookColumnResponses[keyof UpdateCustomGradebookColumnResponses]; + +export type ListEntriesForColumnData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * If true, hidden columns will be included in the + * result. If false or absent, only visible columns + * will be returned. + */ + include_hidden?: boolean; + }; + url: '/v1/courses/{course_id}/custom_gradebook_columns/{id}/data'; +}; + +export type ListEntriesForColumnResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListEntriesForColumnResponse = ListEntriesForColumnResponses[keyof ListEntriesForColumnResponses]; + +export type UpdateColumnDataData = { + body: { + /** + * Column content. Setting this to blank will delete the datum object. + */ + 'column_data[content]': string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/custom_gradebook_columns/{id}/data/{user_id}'; +}; + +export type UpdateColumnDataResponses = { + /** + * No response was specified + */ + 200: ColumnDatum; +}; + +export type UpdateColumnDataResponse = UpdateColumnDataResponses[keyof UpdateColumnDataResponses]; + +export type CreateToolFromToolconfigurationCoursesData = { + body?: { + /** + * if account + */ + account_id?: string; + }; + path: { + /** + * if course + */ + course_id: string; + /** + * no description + */ + developer_key_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/developer_keys/{developer_key_id}/create_tool'; +}; + +export type CreateToolFromToolconfigurationCoursesResponses = { + /** + * No response was specified + */ + 200: ContextExternalTool; +}; + +export type CreateToolFromToolconfigurationCoursesResponse = CreateToolFromToolconfigurationCoursesResponses[keyof CreateToolFromToolconfigurationCoursesResponses]; + +export type ListDiscussionTopicsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * If "all_dates" is passed, all dates associated with graded discussions' + * assignments will be included. + * if "sections" is passed, includes the course sections that are associated + * with the topic, if the topic is specific to certain sections of the course. + * If "sections_user_count" is passed, then: + * (a) If sections were asked for *and* the topic is specific to certain + * course sections, includes the number of users in each + * section. (as part of the section json asked for above) + * (b) Else, includes at the root level the total number of users in the + * topic's context (group or course) that the topic applies to. + * If "overrides" is passed, the overrides for the assignment will be included + */ + include?: 'all_dates' | 'sections' | 'sections_user_count' | 'overrides'; + /** + * Determines the order of the discussion topic list. Defaults to "position". + */ + order_by?: 'position' | 'recent_activity' | 'title'; + /** + * Only return discussion topics in the given state(s). Defaults to including + * all topics. Filtering is done after pagination, so pages + * may be smaller than requested if topics are filtered. + * Can pass multiple states as comma separated string. + */ + scope?: 'locked' | 'unlocked' | 'pinned' | 'unpinned'; + /** + * Return announcements instead of discussion topics. Defaults to false + */ + only_announcements?: boolean; + /** + * The state of the discussion topic to return. Currently only supports unread state. + */ + filter_by?: 'all' | 'unread'; + /** + * The partial title of the discussion topics to match and return. + */ + search_term?: string; + /** + * For students, exclude topics that are locked by module progression. + * Defaults to false. + */ + exclude_context_module_locked_topics?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/discussion_topics'; +}; + +export type ListDiscussionTopicsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListDiscussionTopicsCoursesResponse = ListDiscussionTopicsCoursesResponses[keyof ListDiscussionTopicsCoursesResponses]; + +export type CreateNewDiscussionTopicCoursesData = { + body?: { + /** + * Whether or not users can rate entries in this topic. + */ + allow_rating?: boolean; + /** + * To create an assignment discussion, pass the assignment parameters as a + * sub-object. See the {api:AssignmentsApiController#create Create an Assignment API} + * for the available parameters. The name parameter will be ignored, as it's + * taken from the discussion title. If you want to make a discussion that was + * an assignment NOT an assignment, pass set_assignment = false as part of + * the assignment object + */ + assignment?: unknown; + /** + * A application/x-www-form-urlencoded form-field-style attachment. + * Attachments larger than 1 kilobyte are subject to quota restrictions. + */ + attachment?: Blob | File; + /** + * If a timestamp is given, the topic will not be published until that time. + */ + delayed_post_at?: string; + /** + * The type of discussion. Defaults to side_comment if not value is given. Accepted values are 'side_comment', for discussions that only allow one level of nested comments, and 'threaded' for fully threaded discussions. + */ + discussion_type?: 'side_comment' | 'threaded'; + /** + * If present, the topic will become a group discussion assigned + * to the group. + */ + group_category_id?: number; + /** + * If true, this topic is an announcement. It will appear in the + * announcement's section rather than the discussions section. This requires + * announcment-posting permissions. + */ + is_announcement?: boolean; + /** + * If a timestamp is given, the topic will be scheduled to lock at the + * provided timestamp. If the timestamp is in the past, the topic will be + * locked. + */ + lock_at?: string; + /** + * no description + */ + message?: string; + /** + * If true, only graders will be allowed to rate entries. + */ + only_graders_can_rate?: boolean; + /** + * If true, this topic will be listed in the "Pinned Discussion" section + */ + pinned?: boolean; + /** + * If true, the topic will have an associated podcast feed. + */ + podcast_enabled?: boolean; + /** + * If true, the podcast will include posts from students as well. Implies + * podcast_enabled. + */ + podcast_has_student_posts?: boolean; + /** + * By default, discussions are sorted chronologically by creation date, you + * can pass the id of another topic to have this one show up after the other + * when they are listed. + */ + position_after?: string; + /** + * Whether this topic is published (true) or draft state (false). Only + * teachers and TAs have the ability to create draft state topics. + */ + published?: boolean; + /** + * If true then a user may not respond to other replies until that user has + * made an initial reply. Defaults to false. + */ + require_initial_post?: boolean; + /** + * If true, entries will be sorted by rating. + */ + sort_by_rating?: boolean; + /** + * A comma-separated list of sections ids to which the discussion topic + * should be made specific too. If it is not desired to make the discussion + * topic specific to sections, then this parameter may be omitted or set to + * "all". Can only be present only on announcements and only those that are + * for a course (as opposed to a group). + */ + specific_sections?: string; + /** + * no description + */ + title?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics'; +}; + +export type CreateNewDiscussionTopicCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ReorderPinnedTopicsCoursesData = { + body: { + /** + * The ids of the pinned discussion topics in the desired order. + * (For example, "order=104,102,103".) + */ + order: Array; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/reorder'; +}; + +export type ReorderPinnedTopicsCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteTopicCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}'; +}; + +export type DeleteTopicCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleTopicCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: { + /** + * If "all_dates" is passed, all dates associated with graded discussions' + * assignments will be included. + * if "sections" is passed, includes the course sections that are associated + * with the topic, if the topic is specific to certain sections of the course. + * If "sections_user_count" is passed, then: + * (a) If sections were asked for *and* the topic is specific to certain + * course sections, includes the number of users in each + * section. (as part of the section json asked for above) + * (b) Else, includes at the root level the total number of users in the + * topic's context (group or course) that the topic applies to. + * If "overrides" is passed, the overrides for the assignment will be included + */ + include?: 'all_dates' | 'sections' | 'sections_user_count' | 'overrides'; + }; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}'; +}; + +export type GetSingleTopicCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateTopicCoursesData = { + body?: { + /** + * If true, users will be allowed to rate entries. + */ + allow_rating?: boolean; + /** + * To create an assignment discussion, pass the assignment parameters as a + * sub-object. See the {api:AssignmentsApiController#create Create an Assignment API} + * for the available parameters. The name parameter will be ignored, as it's + * taken from the discussion title. If you want to make a discussion that was + * an assignment NOT an assignment, pass set_assignment = false as part of + * the assignment object + */ + assignment?: unknown; + /** + * If a timestamp is given, the topic will not be published until that time. + */ + delayed_post_at?: string; + /** + * The type of discussion. Defaults to side_comment if not value is given. Accepted values are 'side_comment', for discussions that only allow one level of nested comments, and 'threaded' for fully threaded discussions. + */ + discussion_type?: 'side_comment' | 'threaded'; + /** + * If present, the topic will become a group discussion assigned + * to the group. + */ + group_category_id?: number; + /** + * If true, this topic is an announcement. It will appear in the + * announcement's section rather than the discussions section. This requires + * announcment-posting permissions. + */ + is_announcement?: boolean; + /** + * If a timestamp is given, the topic will be scheduled to lock at the + * provided timestamp. If the timestamp is in the past, the topic will be + * locked. + */ + lock_at?: string; + /** + * no description + */ + message?: string; + /** + * If true, only graders will be allowed to rate entries. + */ + only_graders_can_rate?: boolean; + /** + * If true, this topic will be listed in the "Pinned Discussion" section + */ + pinned?: boolean; + /** + * If true, the topic will have an associated podcast feed. + */ + podcast_enabled?: boolean; + /** + * If true, the podcast will include posts from students as well. Implies + * podcast_enabled. + */ + podcast_has_student_posts?: boolean; + /** + * By default, discussions are sorted chronologically by creation date, you + * can pass the id of another topic to have this one show up after the other + * when they are listed. + */ + position_after?: string; + /** + * Whether this topic is published (true) or draft state (false). Only + * teachers and TAs have the ability to create draft state topics. + */ + published?: boolean; + /** + * If true then a user may not respond to other replies until that user has + * made an initial reply. Defaults to false. + */ + require_initial_post?: boolean; + /** + * If true, entries will be sorted by rating. + */ + sort_by_rating?: boolean; + /** + * A comma-separated list of sections ids to which the discussion topic + * should be made specific too. If it is not desired to make the discussion + * topic specific to sections, then this parameter may be omitted or set to + * "all". Can only be present only on announcements and only those that are + * for a course (as opposed to a group). + */ + specific_sections?: string; + /** + * no description + */ + title?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}'; +}; + +export type UpdateTopicCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListTopicEntriesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries'; +}; + +export type ListTopicEntriesCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type PostEntryCoursesData = { + body?: { + /** + * a application/x-www-form-urlencoded form-field-style + * attachment. Attachments larger than 1 kilobyte are subject to quota + * restrictions. + */ + attachment?: string; + /** + * The body of the entry. + */ + message?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries'; +}; + +export type PostEntryCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RateEntryCoursesData = { + body?: { + /** + * A rating to set on this entry. Only 0 and 1 are accepted. + */ + rating?: number; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + entry_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{entry_id}/rating'; +}; + +export type RateEntryCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkEntryAsUnreadCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + entry_id: string; + }; + query?: { + /** + * A boolean value to set the entry's forced_read_state. No change is made if + * this argument is not specified. + */ + forced_read_state?: boolean; + }; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{entry_id}/read'; +}; + +export type MarkEntryAsUnreadCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkEntryAsReadCoursesData = { + body?: { + /** + * A boolean value to set the entry's forced_read_state. No change is made if + * this argument is not specified. + */ + forced_read_state?: boolean; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + entry_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{entry_id}/read'; +}; + +export type MarkEntryAsReadCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListEntryRepliesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + entry_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{entry_id}/replies'; +}; + +export type ListEntryRepliesCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type PostReplyCoursesData = { + body?: { + /** + * a application/x-www-form-urlencoded form-field-style + * attachment. Attachments larger than 1 kilobyte are subject to quota + * restrictions. + */ + attachment?: string; + /** + * The body of the entry. + */ + message?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + entry_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{entry_id}/replies'; +}; + +export type PostReplyCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteEntryCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{id}'; +}; + +export type DeleteEntryCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateEntryCoursesData = { + body?: { + /** + * The updated body of the entry. + */ + message?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entries/{id}'; +}; + +export type UpdateEntryCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListEntriesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: { + /** + * A list of entry ids to retrieve. Entries will be returned in id order, + * smallest id first. + */ + ids?: Array; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/entry_list'; +}; + +export type ListEntriesCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkTopicAsUnreadCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/read'; +}; + +export type MarkTopicAsUnreadCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkTopicAsReadCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/read'; +}; + +export type MarkTopicAsReadCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkAllEntriesAsUnreadCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: { + /** + * A boolean value to set all of the entries' forced_read_state. No change is + * made if this argument is not specified. + */ + forced_read_state?: boolean; + }; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/read_all'; +}; + +export type MarkAllEntriesAsUnreadCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkAllEntriesAsReadCoursesData = { + body?: { + /** + * A boolean value to set all of the entries' forced_read_state. No change + * is made if this argument is not specified. + */ + forced_read_state?: boolean; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/read_all'; +}; + +export type MarkAllEntriesAsReadCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UnsubscribeFromTopicCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/subscribed'; +}; + +export type UnsubscribeFromTopicCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SubscribeToTopicCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/subscribed'; +}; + +export type SubscribeToTopicCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetFullTopicCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/discussion_topics/{topic_id}/view'; +}; + +export type GetFullTopicCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetEffectiveDueDatesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * no description + */ + assignment_ids?: Array; + }; + url: '/v1/courses/{course_id}/effective_due_dates'; +}; + +export type GetEffectiveDueDatesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListEnrollmentsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + /** + * A list of enrollment types to return. Accepted values are + * 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', + * 'DesignerEnrollment', and 'ObserverEnrollment.' If omitted, all enrollment + * types are returned. This argument is ignored if `role` is given. + */ + type?: Array; + /** + * A list of enrollment roles to return. Accepted values include course-level + * roles created by the {api:RoleOverridesController#add_role Add Role API} + * as well as the base enrollment types accepted by the `type` argument above. + */ + role?: Array; + /** + * Filter by enrollment state. If omitted, 'active' and 'invited' enrollments + * are returned. When querying a user's enrollments (either via user_id + * argument or via user enrollments endpoint), the following additional + * synthetic states are supported: "current_and_invited"|"current_and_future"|"current_and_concluded" + */ + state?: 'active' | 'invited' | 'creation_pending' | 'deleted' | 'rejected' | 'completed' | 'inactive'; + /** + * Array of additional information to include on the enrollment or user records. + * "avatar_url" and "group_ids" will be returned on the user record. + */ + include?: 'avatar_url' | 'group_ids' | 'locked' | 'observed_users' | 'can_be_removed'; + /** + * Filter by user_id (only valid for course or section enrollment + * queries). If set to the current user's id, this is a way to + * determine if the user has any enrollments in the course or section, + * independent of whether the user has permission to view other people + * on the roster. + */ + user_id?: string; + /** + * Return grades for the given grading_period. If this parameter is not + * specified, the returned grades will be for the whole course. + */ + grading_period_id?: number; + /** + * Returns only enrollments for the specified enrollment term. This parameter + * only applies to the user enrollments path. May pass the ID from the + * enrollment terms api or the SIS id prepended with 'sis_term_id:'. + */ + enrollment_term_id?: number; + /** + * Returns only enrollments for the specified SIS account ID(s). Does not + * look into sub_accounts. May pass in array or string. + */ + sis_account_id?: Array; + /** + * Returns only enrollments matching the specified SIS course ID(s). + * May pass in array or string. + */ + sis_course_id?: Array; + /** + * Returns only section enrollments matching the specified SIS section ID(s). + * May pass in array or string. + */ + sis_section_id?: Array; + /** + * Returns only enrollments for the specified SIS user ID(s). May pass in + * array or string. + */ + sis_user_id?: Array; + }; + url: '/v1/courses/{course_id}/enrollments'; +}; + +export type ListEnrollmentsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListEnrollmentsCoursesResponse = ListEnrollmentsCoursesResponses[keyof ListEnrollmentsCoursesResponses]; + +export type EnrollUserCoursesData = { + body: { + /** + * For an observer enrollment, the ID of a student to observe. The + * caller must have +manage_students+ permission in the course. + * This is a one-off operation; to automatically observe all a + * student's enrollments (for example, as a parent), please use + * the {api:UserObserveesController#create User Observees API}. + */ + 'enrollment[associated_user_id]'?: number; + /** + * The ID of the course section to enroll the student in. If the + * section-specific URL is used, this argument is redundant and will be + * ignored. + */ + 'enrollment[course_section_id]'?: number; + /** + * If set to 'active,' student will be immediately enrolled in the course. + * Otherwise they will be required to accept a course invitation. Default is + * 'invited.'. + * + * If set to 'inactive', student will be listed in the course roster for + * teachers, but will not be able to participate in the course until + * their enrollment is activated. + */ + 'enrollment[enrollment_state]'?: 'active' | 'invited' | 'inactive'; + /** + * If set, the enrollment will only allow the user to see and interact with + * users enrolled in the section given by course_section_id. + * * For teachers and TAs, this includes grading privileges. + * * Section-limited students will not see any users (including teachers + * and TAs) not enrolled in their sections. + * * Users may have other enrollments that grant privileges to + * multiple sections in the same course. + */ + 'enrollment[limit_privileges_to_course_section]'?: boolean; + /** + * If true, a notification will be sent to the enrolled user. + * Notifications are not sent by default. + */ + 'enrollment[notify]'?: boolean; + /** + * Assigns a custom course-level role to the user. + */ + 'enrollment[role]'?: unknown; + /** + * Assigns a custom course-level role to the user. + */ + 'enrollment[role_id]'?: number; + /** + * If true, marks the enrollment as a self-enrollment, which gives + * students the ability to drop the course if desired. Defaults to false. + */ + 'enrollment[self_enrolled]'?: boolean; + /** + * If the current user is not allowed to manage enrollments in this + * course, but the course allows self-enrollment, the user can self- + * enroll as a student in the default section by passing in a valid + * code. When self-enrolling, the user_id must be 'self'. The + * enrollment_state will be set to 'active' and all other arguments + * will be ignored. + */ + 'enrollment[self_enrollment_code]'?: string; + /** + * Enroll the user as a student, teacher, TA, observer, or designer. If no + * value is given, the type will be inferred by enrollment[role] if supplied, + * otherwise 'StudentEnrollment' will be used. + */ + 'enrollment[type]': 'StudentEnrollment' | 'TeacherEnrollment' | 'TaEnrollment' | 'ObserverEnrollment' | 'DesignerEnrollment'; + /** + * The ID of the user to be enrolled in the course. + */ + 'enrollment[user_id]': string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/enrollments'; +}; + +export type EnrollUserCoursesResponses = { + /** + * No response was specified + */ + 200: Enrollment; +}; + +export type EnrollUserCoursesResponse = EnrollUserCoursesResponses[keyof EnrollUserCoursesResponses]; + +export type ConcludeDeactivateOrDeleteEnrollmentData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * The action to take on the enrollment. + * When inactive, a user will still appear in the course roster to admins, but be unable to participate. + * ("inactivate" and "deactivate" are equivalent tasks) + */ + task?: 'conclude' | 'delete' | 'inactivate' | 'deactivate'; + }; + url: '/v1/courses/{course_id}/enrollments/{id}'; +}; + +export type ConcludeDeactivateOrDeleteEnrollmentResponses = { + /** + * No response was specified + */ + 200: Enrollment; +}; + +export type ConcludeDeactivateOrDeleteEnrollmentResponse = ConcludeDeactivateOrDeleteEnrollmentResponses[keyof ConcludeDeactivateOrDeleteEnrollmentResponses]; + +export type AcceptCourseInvitationData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/enrollments/{id}/accept'; +}; + +export type AcceptCourseInvitationResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ReActivateEnrollmentData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/enrollments/{id}/reactivate'; +}; + +export type ReActivateEnrollmentResponses = { + /** + * No response was specified + */ + 200: Enrollment; +}; + +export type ReActivateEnrollmentResponse = ReActivateEnrollmentResponses[keyof ReActivateEnrollmentResponses]; + +export type RejectCourseInvitationData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/enrollments/{id}/reject'; +}; + +export type RejectCourseInvitationResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateEpubExportData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/epub_exports'; +}; + +export type CreateEpubExportResponses = { + /** + * No response was specified + */ + 200: EpubExport; +}; + +export type CreateEpubExportResponse = CreateEpubExportResponses[keyof CreateEpubExportResponses]; + +export type ShowEpubExportData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/epub_exports/{id}'; +}; + +export type ShowEpubExportResponses = { + /** + * No response was specified + */ + 200: EpubExport; +}; + +export type ShowEpubExportResponse = ShowEpubExportResponses[keyof ShowEpubExportResponses]; + +export type ListExternalFeedsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/external_feeds'; +}; + +export type ListExternalFeedsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListExternalFeedsCoursesResponse = ListExternalFeedsCoursesResponses[keyof ListExternalFeedsCoursesResponses]; + +export type CreateExternalFeedCoursesData = { + body: { + /** + * If given, only feed entries that contain this string in their title will be imported + */ + header_match?: boolean; + /** + * The url to the external rss or atom feed + */ + url: string; + /** + * Defaults to "full" + */ + verbosity?: 'full' | 'truncate' | 'link_only'; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/external_feeds'; +}; + +export type CreateExternalFeedCoursesResponses = { + /** + * No response was specified + */ + 200: ExternalFeed; +}; + +export type CreateExternalFeedCoursesResponse = CreateExternalFeedCoursesResponses[keyof CreateExternalFeedCoursesResponses]; + +export type DeleteExternalFeedCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + external_feed_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/external_feeds/{external_feed_id}'; +}; + +export type DeleteExternalFeedCoursesResponses = { + /** + * No response was specified + */ + 200: ExternalFeed; +}; + +export type DeleteExternalFeedCoursesResponse = DeleteExternalFeedCoursesResponses[keyof DeleteExternalFeedCoursesResponses]; + +export type ListExternalToolsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The partial name of the tools to match and return. + */ + search_term?: string; + /** + * If true, then only tools that are meant to be selectable are returned + */ + selectable?: boolean; + /** + * If true, then include tools installed in all accounts above the current context + */ + include_parents?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/external_tools'; +}; + +export type ListExternalToolsCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateExternalToolCoursesData = { + body: { + /** + * The layout type to use when launching the tool. Must be + * "full_width", "full_width_in_context", "borderless", or "default" + */ + 'account_navigation[display_type]'?: string; + /** + * Set this to enable this feature + */ + 'account_navigation[enabled]'?: boolean; + /** + * The height of the dialog the tool is launched in + */ + 'account_navigation[selection_height]'?: string; + /** + * The width of the dialog the tool is launched in + */ + 'account_navigation[selection_width]'?: string; + /** + * The text that will show on the left-tab in the account navigation + */ + 'account_navigation[text]'?: string; + /** + * The url of the external tool for account navigation + */ + 'account_navigation[url]'?: string; + /** + * Configuration can be passed in as CC xml instead of using query + * parameters. If this value is "by_url" or "by_xml" then an xml + * configuration will be expected in either the "config_xml" or "config_url" + * parameter. Note that the name parameter overrides the tool name provided + * in the xml + */ + config_type?: string; + /** + * URL where the server can retrieve an XML tool configuration, as specified + * in the CC xml specification. This is required if "config_type" is set to + * "by_url" + */ + config_url?: string; + /** + * XML tool configuration, as specified in the CC xml specification. This is + * required if "config_type" is set to "by_xml" + */ + config_xml?: string; + /** + * The consumer key for the external tool + */ + consumer_key: string; + /** + * Set this to enable this feature + */ + 'course_home_sub_navigation[enabled]'?: boolean; + /** + * The url of the icon to show in the right-side course home navigation menu + */ + 'course_home_sub_navigation[icon_url]'?: string; + /** + * The text that will show on the right-side course home navigation menu + */ + 'course_home_sub_navigation[text]'?: string; + /** + * The url of the external tool for right-side course home navigation menu + */ + 'course_home_sub_navigation[url]'?: string; + /** + * Whether the navigation option will show in the course by default or + * whether the teacher will have to explicitly enable it + */ + 'course_navigation[default]'?: boolean; + /** + * The layout type to use when launching the tool. Must be + * "full_width", "full_width_in_context", "borderless", or "default" + */ + 'course_navigation[display_type]'?: string; + /** + * Set this to enable this feature + */ + 'course_navigation[enabled]'?: boolean; + /** + * The text that will show on the left-tab in the course navigation + */ + 'course_navigation[text]'?: string; + /** + * Who will see the navigation tab. "admins" for course admins, "members" for + * students, null for everyone + */ + 'course_navigation[visibility]'?: 'admins' | 'members'; + /** + * Determines how the navigation tab will be opened. + * "_blank" Launches the external tool in a new window or tab. + * "_self" (Default) Launches the external tool in an iframe inside of Canvas. + */ + 'course_navigation[windowTarget]'?: '_blank' | '_self'; + /** + * Custom fields that will be sent to the tool consumer; can be used + * multiple times + */ + 'custom_fields[field_name]'?: string; + /** + * A description of the tool + */ + description?: string; + /** + * The domain to match links against. Either "url" or "domain" should be + * set, not both. + */ + domain?: string; + /** + * Set this to enable this feature + */ + 'editor_button[enabled]'?: boolean; + /** + * The url of the icon to show in the WYSIWYG editor + */ + 'editor_button[icon_url]'?: string; + /** + * Set this to ContentItemSelectionRequest to tell the tool to use + * content-item; otherwise, omit + */ + 'editor_button[message_type]'?: string; + /** + * The height of the dialog the tool is launched in + */ + 'editor_button[selection_height]'?: string; + /** + * The width of the dialog the tool is launched in + */ + 'editor_button[selection_width]'?: string; + /** + * The url of the external tool + */ + 'editor_button[url]'?: string; + /** + * Set this to enable this feature + */ + 'homework_submission[enabled]'?: boolean; + /** + * Set this to ContentItemSelectionRequest to tell the tool to use + * content-item; otherwise, omit + */ + 'homework_submission[message_type]'?: string; + /** + * The text that will show on the homework submission tab + */ + 'homework_submission[text]'?: string; + /** + * The url of the external tool + */ + 'homework_submission[url]'?: string; + /** + * The url of the icon to show for this tool + */ + icon_url?: string; + /** + * Set this to enable this feature + */ + 'link_selection[enabled]'?: boolean; + /** + * Set this to ContentItemSelectionRequest to tell the tool to use + * content-item; otherwise, omit + */ + 'link_selection[message_type]'?: string; + /** + * The text that will show for the link selection text + */ + 'link_selection[text]'?: string; + /** + * The url of the external tool + */ + 'link_selection[url]'?: string; + /** + * Set this to enable this feature + */ + 'migration_selection[enabled]'?: boolean; + /** + * Set this to ContentItemSelectionRequest to tell the tool to use + * content-item; otherwise, omit + */ + 'migration_selection[message_type]'?: string; + /** + * The url of the external tool + */ + 'migration_selection[url]'?: string; + /** + * The name of the tool + */ + name: string; + /** + * Default: false, if set to true the tool won't show up in the external tool + * selection UI in modules and assignments + */ + not_selectable?: boolean; + /** + * Default: false, if set to true LTI query params will not be copied to the + * post body. + */ + oauth_compliant?: boolean; + /** + * What information to send to the external tool. + */ + privacy_level: 'anonymous' | 'name_only' | 'public'; + /** + * Set this to enable this feature + */ + 'resource_selection[enabled]'?: boolean; + /** + * The url of the icon to show in the module external tool list + */ + 'resource_selection[icon_url]'?: string; + /** + * The height of the dialog the tool is launched in + */ + 'resource_selection[selection_height]'?: string; + /** + * The width of the dialog the tool is launched in + */ + 'resource_selection[selection_width]'?: string; + /** + * The url of the external tool + */ + 'resource_selection[url]'?: string; + /** + * The shared secret with the external tool + */ + shared_secret: string; + /** + * The default text to show for this tool + */ + text?: string; + /** + * Set this to enable this feature + */ + 'tool_configuration[enabled]'?: boolean; + /** + * Set this to ContentItemSelectionRequest to tell the tool to use + * content-item; otherwise, omit + */ + 'tool_configuration[message_type]'?: string; + /** + * Set this to default the lis_person_contact_email_primary to prefer + * provisioned sis_email; otherwise, omit + */ + 'tool_configuration[prefer_sis_email]'?: boolean; + /** + * The url of the external tool + */ + 'tool_configuration[url]'?: string; + /** + * The url to match links against. Either "url" or "domain" should be set, + * not both. + */ + url?: string; + /** + * Set this to enable this feature + */ + 'user_navigation[enabled]'?: boolean; + /** + * The text that will show on the left-tab in the user navigation + */ + 'user_navigation[text]'?: string; + /** + * The url of the external tool for user navigation + */ + 'user_navigation[url]'?: string; + /** + * Who will see the navigation tab. "admins" for admins, "public" or + * "members" for everyone + */ + 'user_navigation[visibility]'?: 'admins' | 'members' | 'public'; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/external_tools'; +}; + +export type CreateExternalToolCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSessionlessLaunchUrlForExternalToolCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The external id of the tool to launch. + */ + id?: string; + /** + * The LTI launch url for the external tool. + */ + url?: string; + /** + * The assignment id for an assignment launch. Required if launch_type is set to "assessment". + */ + assignment_id?: string; + /** + * The assignment id for a module item launch. Required if launch_type is set to "module_item". + */ + module_item_id?: string; + /** + * The type of launch to perform on the external tool. Placement names (eg. "course_navigation") + * can also be specified to use the custom launch url for that placement; if done, the tool id + * must be provided. + */ + launch_type?: 'assessment' | 'module_item'; + }; + url: '/v1/courses/{course_id}/external_tools/sessionless_launch'; +}; + +export type GetSessionlessLaunchUrlForExternalToolCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteExternalToolCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + external_tool_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/external_tools/{external_tool_id}'; +}; + +export type DeleteExternalToolCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleExternalToolCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + external_tool_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/external_tools/{external_tool_id}'; +}; + +export type GetSingleExternalToolCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type EditExternalToolCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + external_tool_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/external_tools/{external_tool_id}'; +}; + +export type EditExternalToolCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListFeaturesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/features'; +}; + +export type ListFeaturesCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListFeaturesCoursesResponse = ListFeaturesCoursesResponses[keyof ListFeaturesCoursesResponses]; + +export type ListEnabledFeaturesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/features/enabled'; +}; + +export type ListEnabledFeaturesCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RemoveFeatureFlagCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + feature: string; + }; + query?: never; + url: '/v1/courses/{course_id}/features/flags/{feature}'; +}; + +export type RemoveFeatureFlagCoursesResponses = { + /** + * No response was specified + */ + 200: FeatureFlag; +}; + +export type RemoveFeatureFlagCoursesResponse = RemoveFeatureFlagCoursesResponses[keyof RemoveFeatureFlagCoursesResponses]; + +export type GetFeatureFlagCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + feature: string; + }; + query?: never; + url: '/v1/courses/{course_id}/features/flags/{feature}'; +}; + +export type GetFeatureFlagCoursesResponses = { + /** + * No response was specified + */ + 200: FeatureFlag; +}; + +export type GetFeatureFlagCoursesResponse = GetFeatureFlagCoursesResponses[keyof GetFeatureFlagCoursesResponses]; + +export type SetFeatureFlagCoursesData = { + body?: { + /** + * "off":: The feature is not available for the course, user, or account and sub-accounts. + * "allowed":: (valid only on accounts) The feature is off in the account, but may be enabled in + * sub-accounts and courses by setting a feature flag on the sub-account or course. + * "on":: The feature is turned on unconditionally for the user, course, or account and sub-accounts. + */ + state?: false | 'allowed' | true; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + feature: string; + }; + query?: never; + url: '/v1/courses/{course_id}/features/flags/{feature}'; +}; + +export type SetFeatureFlagCoursesResponses = { + /** + * No response was specified + */ + 200: FeatureFlag; +}; + +export type SetFeatureFlagCoursesResponse = SetFeatureFlagCoursesResponses[keyof SetFeatureFlagCoursesResponses]; + +export type ListFilesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * Filter results by content-type. You can specify type/subtype pairs (e.g., + * 'image/jpeg'), or simply types (e.g., 'image', which will match + * 'image/gif', 'image/jpeg', etc.). + */ + content_types?: Array; + /** + * The partial name of the files to match and return. + */ + search_term?: string; + /** + * Array of additional information to include. + * + * "user":: the user who uploaded the file or last edited its content + * "usage_rights":: copyright and license information for the file (see UsageRights) + */ + include?: 'user'; + /** + * Array of information to restrict to. Overrides include[] + * + * "names":: only returns file name information + */ + only?: Array>; + /** + * Sort results by this field. Defaults to 'name'. Note that `sort=user` implies `include[]=user`. + */ + sort?: 'name' | 'size' | 'created_at' | 'updated_at' | 'content_type' | 'user'; + /** + * The sorting order. Defaults to 'asc'. + */ + order?: 'asc' | 'desc'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/files'; +}; + +export type ListFilesCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListFilesCoursesResponse = ListFilesCoursesResponses[keyof ListFilesCoursesResponses]; + +export type GetQuotaInformationCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/files/quota'; +}; + +export type GetQuotaInformationCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetFileCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * Array of additional information to include. + * + * "user":: the user who uploaded the file or last edited its content + * "usage_rights":: copyright and license information for the file (see UsageRights) + */ + include?: 'user'; + }; + url: '/v1/courses/{course_id}/files/{id}'; +}; + +export type GetFileCoursesResponses = { + /** + * No response was specified + */ + 200: File; +}; + +export type GetFileCoursesResponse = GetFileCoursesResponses[keyof GetFileCoursesResponses]; + +export type ListAllFoldersCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/folders'; +}; + +export type ListAllFoldersCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAllFoldersCoursesResponse = ListAllFoldersCoursesResponses[keyof ListAllFoldersCoursesResponses]; + +export type CreateFolderCoursesData = { + body: { + /** + * Flag the folder as hidden + */ + hidden?: boolean; + /** + * The datetime to lock the folder at + */ + lock_at?: string; + /** + * Flag the folder as locked + */ + locked?: boolean; + /** + * The name of the folder + */ + name: string; + /** + * The id of the folder to store the file in. If this and parent_folder_path are sent an error will be returned. If neither is given, a default folder will be used. + */ + parent_folder_id?: string; + /** + * The path of the folder to store the new folder in. The path separator is the forward slash `/`, never a back slash. The parent folder will be created if it does not already exist. This parameter only applies to new folders in a context that has folders, such as a user, a course, or a group. If this and parent_folder_id are sent an error will be returned. If neither is given, a default folder will be used. + */ + parent_folder_path?: string; + /** + * Set an explicit sort position for the folder + */ + position?: number; + /** + * The datetime to unlock the folder at + */ + unlock_at?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/folders'; +}; + +export type CreateFolderCoursesResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type CreateFolderCoursesResponse = CreateFolderCoursesResponses[keyof CreateFolderCoursesResponses]; + +export type ResolvePathCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/folders/by_path'; +}; + +export type ResolvePathCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ResolvePathCoursesResponse = ResolvePathCoursesResponses[keyof ResolvePathCoursesResponses]; + +export type ResolvePathCoursesFullPathData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/folders/by_path/*full_path'; +}; + +export type ResolvePathCoursesFullPathResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ResolvePathCoursesFullPathResponse = ResolvePathCoursesFullPathResponses[keyof ResolvePathCoursesFullPathResponses]; + +export type GetFolderCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/folders/{id}'; +}; + +export type GetFolderCoursesResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type GetFolderCoursesResponse = GetFolderCoursesResponses[keyof GetFolderCoursesResponses]; + +export type ShowFrontPageCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/front_page'; +}; + +export type ShowFrontPageCoursesResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type ShowFrontPageCoursesResponse = ShowFrontPageCoursesResponses[keyof ShowFrontPageCoursesResponses]; + +export type UpdateCreateFrontPageCoursesData = { + body?: { + /** + * The content for the new page. + */ + 'wiki_page[body]'?: string; + /** + * Which user roles are allowed to edit this page. Any combination + * of these roles is allowed (separated by commas). + * + * "teachers":: Allows editing by teachers in the course. + * "students":: Allows editing by students in the course. + * "members":: For group wikis, allows editing by members of the group. + * "public":: Allows editing by any user. + */ + 'wiki_page[editing_roles]'?: 'teachers' | 'students' | 'members' | 'public'; + /** + * Whether participants should be notified when this page changes. + */ + 'wiki_page[notify_of_update]'?: boolean; + /** + * Whether the page is published (true) or draft state (false). + */ + 'wiki_page[published]'?: boolean; + /** + * The title for the new page. NOTE: changing a page's title will change its + * url. The updated url will be returned in the result. + */ + 'wiki_page[title]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/front_page'; +}; + +export type UpdateCreateFrontPageCoursesResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type UpdateCreateFrontPageCoursesResponse = UpdateCreateFrontPageCoursesResponses[keyof UpdateCreateFrontPageCoursesResponses]; + +export type DaysInGradebookHistoryForThisCourseData = { + body?: never; + path: { + /** + * The id of the contextual course for this API call + */ + course_id: number; + }; + query?: never; + url: '/v1/courses/{course_id}/gradebook_history/days'; +}; + +export type DaysInGradebookHistoryForThisCourseResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type DaysInGradebookHistoryForThisCourseResponse = DaysInGradebookHistoryForThisCourseResponses[keyof DaysInGradebookHistoryForThisCourseResponses]; + +export type ListUncollatedSubmissionVersionsData = { + body?: never; + path: { + /** + * The id of the contextual course for this API call + */ + course_id: number; + }; + query?: { + /** + * The ID of the assignment for which you want to see submissions. If + * absent, versions of submissions from any assignment in the course are + * included. + */ + assignment_id?: number; + /** + * The ID of the user for which you want to see submissions. If absent, + * versions of submissions from any user in the course are included. + */ + user_id?: number; + /** + * Returns submission versions in ascending date order (oldest first). If + * absent, returns submission versions in descending date order (newest + * first). + */ + ascending?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/gradebook_history/feed'; +}; + +export type ListUncollatedSubmissionVersionsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListUncollatedSubmissionVersionsResponse = ListUncollatedSubmissionVersionsResponses[keyof ListUncollatedSubmissionVersionsResponses]; + +export type DetailsForGivenDateInGradebookHistoryForThisCourseData = { + body?: never; + path: { + /** + * The id of the contextual course for this API call + */ + course_id: number; + /** + * The date for which you would like to see detailed information + */ + date: string; + }; + query?: never; + url: '/v1/courses/{course_id}/gradebook_history/{date}'; +}; + +export type DetailsForGivenDateInGradebookHistoryForThisCourseResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type DetailsForGivenDateInGradebookHistoryForThisCourseResponse = DetailsForGivenDateInGradebookHistoryForThisCourseResponses[keyof DetailsForGivenDateInGradebookHistoryForThisCourseResponses]; + +export type ListsSubmissionsData = { + body?: never; + path: { + /** + * The id of the contextual course for this API call + */ + course_id: number; + /** + * The date for which you would like to see submissions + */ + date: string; + /** + * The ID of the grader for which you want to see submissions + */ + grader_id: number; + /** + * The ID of the assignment for which you want to see submissions + */ + assignment_id: number; + }; + query?: never; + url: '/v1/courses/{course_id}/gradebook_history/{date}/graders/{grader_id}/assignments/{assignment_id}/submissions'; +}; + +export type ListsSubmissionsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListsSubmissionsResponse = ListsSubmissionsResponses[keyof ListsSubmissionsResponses]; + +export type ListGradingPeriodsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/grading_periods'; +}; + +export type ListGradingPeriodsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListGradingPeriodsCoursesResponse = ListGradingPeriodsCoursesResponses[keyof ListGradingPeriodsCoursesResponses]; + +export type DeleteGradingPeriodCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/grading_periods/{id}'; +}; + +export type DeleteGradingPeriodCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleGradingPeriodData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/grading_periods/{id}'; +}; + +export type GetSingleGradingPeriodResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateSingleGradingPeriodData = { + body: { + /** + * no description + */ + 'grading_periods[end_date]': Array; + /** + * The date the grading period starts. + */ + 'grading_periods[start_date]': Array; + /** + * A weight value that contributes to the overall weight of a grading period set which is used to calculate how much assignments in this period contribute to the total grade + */ + 'grading_periods[weight]'?: Array; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/grading_periods/{id}'; +}; + +export type UpdateSingleGradingPeriodResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListGradingStandardsAvailableInContextCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/grading_standards'; +}; + +export type ListGradingStandardsAvailableInContextCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListGradingStandardsAvailableInContextCoursesResponse = ListGradingStandardsAvailableInContextCoursesResponses[keyof ListGradingStandardsAvailableInContextCoursesResponses]; + +export type CreateNewGradingStandardCoursesData = { + body: { + /** + * The name for an entry value within a GradingStandard that describes the range of the value + * e.g. A- + */ + 'grading_scheme_entry[name]': Array; + /** + * The value for the name of the entry within a GradingStandard. + * The entry represents the lower bound of the range for the entry. + * This range includes the value up to the next entry in the GradingStandard, + * or 100 if there is no upper bound. The lowest value will have a lower bound range of 0. + * e.g. 93 + */ + 'grading_scheme_entry[value]': Array; + /** + * The title for the Grading Standard. + */ + title: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/grading_standards'; +}; + +export type CreateNewGradingStandardCoursesResponses = { + /** + * No response was specified + */ + 200: GradingStandard; +}; + +export type CreateNewGradingStandardCoursesResponse = CreateNewGradingStandardCoursesResponses[keyof CreateNewGradingStandardCoursesResponses]; + +export type GetSingleGradingStandardInContextCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + grading_standard_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/grading_standards/{grading_standard_id}'; +}; + +export type GetSingleGradingStandardInContextCoursesResponses = { + /** + * No response was specified + */ + 200: GradingStandard; +}; + +export type GetSingleGradingStandardInContextCoursesResponse = GetSingleGradingStandardInContextCoursesResponses[keyof GetSingleGradingStandardInContextCoursesResponses]; + +export type ListGroupCategoriesForContextCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/group_categories'; +}; + +export type ListGroupCategoriesForContextCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListGroupCategoriesForContextCoursesResponse = ListGroupCategoriesForContextCoursesResponses[keyof ListGroupCategoriesForContextCoursesResponses]; + +export type CreateGroupCategoryCoursesData = { + body: { + /** + * Assigns group leaders automatically when generating and allocating students to groups + * Valid values are: + * "first":: the first student to be allocated to a group is the leader + * "random":: a random student from all members is chosen as the leader + */ + auto_leader?: 'first' | 'random'; + /** + * Create this number of groups (Course Only). + */ + create_group_count?: number; + /** + * Limit the maximum number of users in each group (Course Only). Requires + * self signup. + */ + group_limit?: number; + /** + * Name of the group category + */ + name: string; + /** + * Allow students to sign up for a group themselves (Course Only). + * valid values are: + * "enabled":: allows students to self sign up for any group in course + * "restricted":: allows students to self sign up only for groups in the + * same section null disallows self sign up + */ + self_signup?: 'enabled' | 'restricted'; + /** + * The unique SIS identifier. + */ + sis_group_category_id?: string; + /** + * (Deprecated) + * Create this number of groups, and evenly distribute students + * among them. not allowed with "enable_self_signup". because + * the group assignment happens synchronously, it's recommended + * that you instead use the assign_unassigned_members endpoint. + * (Course Only) + */ + split_group_count?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/group_categories'; +}; + +export type CreateGroupCategoryCoursesResponses = { + /** + * No response was specified + */ + 200: GroupCategory; +}; + +export type CreateGroupCategoryCoursesResponse = CreateGroupCategoryCoursesResponses[keyof CreateGroupCategoryCoursesResponses]; + +export type ListGroupsAvailableInContextCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * Will only include groups that the user belongs to if this is set + */ + only_own_groups?: boolean; + /** + * - "tabs": Include the list of tabs configured for each group. See the + * {api:TabsController#index List available tabs API} for more information. + */ + include?: 'tabs'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/groups'; +}; + +export type ListGroupsAvailableInContextCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListGroupsAvailableInContextCoursesResponse = ListGroupsAvailableInContextCoursesResponses[keyof ListGroupsAvailableInContextCoursesResponses]; + +export type ListLiveAssessmentsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/live_assessments'; +}; + +export type ListLiveAssessmentsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateOrFindLiveAssessmentData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/live_assessments'; +}; + +export type CreateOrFindLiveAssessmentResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListLiveAssessmentResultsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assessment_id: string; + }; + query?: { + /** + * If set, restrict results to those for this user + */ + user_id?: number; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/live_assessments/{assessment_id}/results'; +}; + +export type ListLiveAssessmentResultsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateLiveAssessmentResultsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + assessment_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/live_assessments/{assessment_id}/results'; +}; + +export type CreateLiveAssessmentResultsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetModuleItemSequenceData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The type of asset to find module sequence information for. Use the ModuleItem if it is known + * (e.g., the user navigated from a module item), since this will avoid ambiguity if the asset + * appears more than once in the module sequence. + */ + asset_type?: 'ModuleItem' | 'File' | 'Page' | 'Discussion' | 'Assignment' | 'Quiz' | 'ExternalTool'; + /** + * The id of the asset (or the url in the case of a Page) + */ + asset_id?: number; + }; + url: '/v1/courses/{course_id}/module_item_sequence'; +}; + +export type GetModuleItemSequenceResponses = { + /** + * No response was specified + */ + 200: ModuleItemSequence; +}; + +export type GetModuleItemSequenceResponse = GetModuleItemSequenceResponses[keyof GetModuleItemSequenceResponses]; + +export type ListModulesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * - "items": Return module items inline if possible. + * This parameter suggests that Canvas return module items directly + * in the Module object JSON, to avoid having to make separate API + * requests for each module when enumerating modules and items. Canvas + * is free to omit 'items' for any particular module if it deems them + * too numerous to return inline. Callers must be prepared to use the + * {api:ContextModuleItemsApiController#index List Module Items API} + * if items are not returned. + * - "content_details": Requires include['items']. Returns additional + * details with module items specific to their associated content items. + * Includes standard lock information for each item. + */ + include?: 'items' | 'content_details'; + /** + * The partial name of the modules (and module items, if include['items'] is + * specified) to match and return. + */ + search_term?: string; + /** + * Returns module completion information for the student with this id. + */ + student_id?: string; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/modules'; +}; + +export type ListModulesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListModulesResponse = ListModulesResponses[keyof ListModulesResponses]; + +export type CreateModuleData = { + body: { + /** + * The name of the module + */ + 'module[name]': string; + /** + * The position of this module in the course (1-based) + */ + 'module[position]'?: number; + /** + * IDs of Modules that must be completed before this one is unlocked. + * Prerequisite modules must precede this module (i.e. have a lower position + * value), otherwise they will be ignored + */ + 'module[prerequisite_module_ids]'?: Array; + /** + * Whether to publish the student's final grade for the course upon + * completion of this module. + */ + 'module[publish_final_grade]'?: boolean; + /** + * Whether module items must be unlocked in order + */ + 'module[require_sequential_progress]'?: boolean; + /** + * The date the module will unlock + */ + 'module[unlock_at]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/modules'; +}; + +export type CreateModuleResponses = { + /** + * No response was specified + */ + 200: Module; +}; + +export type CreateModuleResponse = CreateModuleResponses[keyof CreateModuleResponses]; + +export type DeleteModuleData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/modules/{id}'; +}; + +export type DeleteModuleResponses = { + /** + * No response was specified + */ + 200: Module; +}; + +export type DeleteModuleResponse = DeleteModuleResponses[keyof DeleteModuleResponses]; + +export type ShowModuleData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * - "items": Return module items inline if possible. + * This parameter suggests that Canvas return module items directly + * in the Module object JSON, to avoid having to make separate API + * requests for each module when enumerating modules and items. Canvas + * is free to omit 'items' for any particular module if it deems them + * too numerous to return inline. Callers must be prepared to use the + * {api:ContextModuleItemsApiController#index List Module Items API} + * if items are not returned. + * - "content_details": Requires include['items']. Returns additional + * details with module items specific to their associated content items. + * Includes standard lock information for each item. + */ + include?: 'items' | 'content_details'; + /** + * Returns module completion information for the student with this id. + */ + student_id?: string; + }; + url: '/v1/courses/{course_id}/modules/{id}'; +}; + +export type ShowModuleResponses = { + /** + * No response was specified + */ + 200: Module; +}; + +export type ShowModuleResponse = ShowModuleResponses[keyof ShowModuleResponses]; + +export type UpdateModuleData = { + body?: { + /** + * The name of the module + */ + 'module[name]'?: string; + /** + * The position of the module in the course (1-based) + */ + 'module[position]'?: number; + /** + * IDs of Modules that must be completed before this one is unlocked + * Prerequisite modules must precede this module (i.e. have a lower position + * value), otherwise they will be ignored + */ + 'module[prerequisite_module_ids]'?: Array; + /** + * Whether to publish the student's final grade for the course upon + * completion of this module. + */ + 'module[publish_final_grade]'?: boolean; + /** + * Whether the module is published and visible to students + */ + 'module[published]'?: boolean; + /** + * Whether module items must be unlocked in order + */ + 'module[require_sequential_progress]'?: boolean; + /** + * The date the module will unlock + */ + 'module[unlock_at]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/modules/{id}'; +}; + +export type UpdateModuleResponses = { + /** + * No response was specified + */ + 200: Module; +}; + +export type UpdateModuleResponse = UpdateModuleResponses[keyof UpdateModuleResponses]; + +export type ReLockModuleProgressionsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/modules/{id}/relock'; +}; + +export type ReLockModuleProgressionsResponses = { + /** + * No response was specified + */ + 200: Module; +}; + +export type ReLockModuleProgressionsResponse = ReLockModuleProgressionsResponses[keyof ReLockModuleProgressionsResponses]; + +export type ListModuleItemsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + module_id: string; + }; + query?: { + /** + * If included, will return additional details specific to the content + * associated with each item. Refer to the {api:Modules:Module%20Item Module + * Item specification} for more details. + * Includes standard lock information for each item. + */ + include?: 'content_details'; + /** + * The partial title of the items to match and return. + */ + search_term?: string; + /** + * Returns module completion information for the student with this id. + */ + student_id?: string; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/modules/{module_id}/items'; +}; + +export type ListModuleItemsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListModuleItemsResponse = ListModuleItemsResponses[keyof ListModuleItemsResponses]; + +export type CreateModuleItemData = { + body: { + /** + * Minimum score required to complete. Required for completion_requirement + * type 'min_score'. + */ + 'module_item[completion_requirement][min_score]'?: number; + /** + * Completion requirement for this module item. + * "must_view": Applies to all item types + * "must_contribute": Only applies to "Assignment", "Discussion", and "Page" types + * "must_submit", "min_score": Only apply to "Assignment" and "Quiz" types + * Inapplicable types will be ignored + */ + 'module_item[completion_requirement][type]'?: 'must_view' | 'must_contribute' | 'must_submit'; + /** + * The id of the content to link to the module item. Required, except for + * 'ExternalUrl', 'Page', and 'SubHeader' types. + */ + 'module_item[content_id]': string; + /** + * External url that the item points to. [Required for 'ExternalUrl' and + * 'ExternalTool' types. + */ + 'module_item[external_url]'?: string; + /** + * 0-based indent level; module items may be indented to show a hierarchy + */ + 'module_item[indent]'?: number; + /** + * Whether the external tool opens in a new tab. Only applies to + * 'ExternalTool' type. + */ + 'module_item[new_tab]'?: boolean; + /** + * Suffix for the linked wiki page (e.g. 'front-page'). Required for 'Page' + * type. + */ + 'module_item[page_url]'?: string; + /** + * The position of this item in the module (1-based). + */ + 'module_item[position]'?: number; + /** + * The name of the module item and associated content + */ + 'module_item[title]'?: string; + /** + * The type of content linked to the item + */ + 'module_item[type]': 'File' | 'Page' | 'Discussion' | 'Assignment' | 'Quiz' | 'SubHeader' | 'ExternalUrl' | 'ExternalTool'; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + module_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/modules/{module_id}/items'; +}; + +export type CreateModuleItemResponses = { + /** + * No response was specified + */ + 200: ModuleItem; +}; + +export type CreateModuleItemResponse = CreateModuleItemResponses[keyof CreateModuleItemResponses]; + +export type DeleteModuleItemData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + module_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}'; +}; + +export type DeleteModuleItemResponses = { + /** + * No response was specified + */ + 200: ModuleItem; +}; + +export type DeleteModuleItemResponse = DeleteModuleItemResponses[keyof DeleteModuleItemResponses]; + +export type ShowModuleItemData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + module_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * If included, will return additional details specific to the content + * associated with this item. Refer to the {api:Modules:Module%20Item Module + * Item specification} for more details. + * Includes standard lock information for each item. + */ + include?: 'content_details'; + /** + * Returns module completion information for the student with this id. + */ + student_id?: string; + }; + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}'; +}; + +export type ShowModuleItemResponses = { + /** + * No response was specified + */ + 200: ModuleItem; +}; + +export type ShowModuleItemResponse = ShowModuleItemResponses[keyof ShowModuleItemResponses]; + +export type UpdateModuleItemData = { + body?: { + /** + * Minimum score required to complete, Required for completion_requirement + * type 'min_score'. + */ + 'module_item[completion_requirement][min_score]'?: number; + /** + * Completion requirement for this module item. + * "must_view": Applies to all item types + * "must_contribute": Only applies to "Assignment", "Discussion", and "Page" types + * "must_submit", "min_score": Only apply to "Assignment" and "Quiz" types + * Inapplicable types will be ignored + */ + 'module_item[completion_requirement][type]'?: 'must_view' | 'must_contribute' | 'must_submit'; + /** + * External url that the item points to. Only applies to 'ExternalUrl' type. + */ + 'module_item[external_url]'?: string; + /** + * 0-based indent level; module items may be indented to show a hierarchy + */ + 'module_item[indent]'?: number; + /** + * Move this item to another module by specifying the target module id here. + * The target module must be in the same course. + */ + 'module_item[module_id]'?: string; + /** + * Whether the external tool opens in a new tab. Only applies to + * 'ExternalTool' type. + */ + 'module_item[new_tab]'?: boolean; + /** + * The position of this item in the module (1-based) + */ + 'module_item[position]'?: number; + /** + * Whether the module item is published and visible to students. + */ + 'module_item[published]'?: boolean; + /** + * The name of the module item + */ + 'module_item[title]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + module_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}'; +}; + +export type UpdateModuleItemResponses = { + /** + * No response was specified + */ + 200: ModuleItem; +}; + +export type UpdateModuleItemResponse = UpdateModuleItemResponses[keyof UpdateModuleItemResponses]; + +export type MarkModuleItemAsDoneNotDoneData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + module_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}/done'; +}; + +export type MarkModuleItemAsDoneNotDoneResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkModuleItemReadData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + module_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}/mark_read'; +}; + +export type MarkModuleItemReadResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SelectMasteryPathData = { + body?: { + /** + * Assignment set chosen, as specified in the mastery_paths portion of the + * context module item response + */ + assignment_set_id?: string; + /** + * Which student the selection applies to. If not specified, current user is + * implied. + */ + student_id?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + module_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/modules/{module_id}/items/{id}/select_mastery_path'; +}; + +export type SelectMasteryPathResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetAlignedAssignmentsForOutcomeInCourseForParticularStudentData = { + body?: never; + path: { + /** + * The id of the course + */ + course_id: number; + }; + query?: { + /** + * The id of the student + */ + student_id?: number; + }; + url: '/v1/courses/{course_id}/outcome_alignments'; +}; + +export type GetAlignedAssignmentsForOutcomeInCourseForParticularStudentResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAlignedAssignmentsForOutcomeInCourseForParticularStudentResponse = GetAlignedAssignmentsForOutcomeInCourseForParticularStudentResponses[keyof GetAlignedAssignmentsForOutcomeInCourseForParticularStudentResponses]; + +export type GetAllOutcomeLinksForContextCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The detail level of the outcomes. Defaults to "abbrev". + * Specify "full" for more information. + */ + outcome_style?: string; + /** + * The detail level of the outcome groups. Defaults to "abbrev". + * Specify "full" for more information. + */ + outcome_group_style?: string; + }; + url: '/v1/courses/{course_id}/outcome_group_links'; +}; + +export type GetAllOutcomeLinksForContextCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAllOutcomeLinksForContextCoursesResponse = GetAllOutcomeLinksForContextCoursesResponses[keyof GetAllOutcomeLinksForContextCoursesResponses]; + +export type GetAllOutcomeGroupsForContextCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_groups'; +}; + +export type GetAllOutcomeGroupsForContextCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAllOutcomeGroupsForContextCoursesResponse = GetAllOutcomeGroupsForContextCoursesResponses[keyof GetAllOutcomeGroupsForContextCoursesResponses]; + +export type DeleteOutcomeGroupCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_groups/{id}'; +}; + +export type DeleteOutcomeGroupCoursesResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type DeleteOutcomeGroupCoursesResponse = DeleteOutcomeGroupCoursesResponses[keyof DeleteOutcomeGroupCoursesResponses]; + +export type ShowOutcomeGroupCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_groups/{id}'; +}; + +export type ShowOutcomeGroupCoursesResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type ShowOutcomeGroupCoursesResponse = ShowOutcomeGroupCoursesResponses[keyof ShowOutcomeGroupCoursesResponses]; + +export type UpdateOutcomeGroupCoursesData = { + body?: { + /** + * The new outcome group description. + */ + description?: string; + /** + * The id of the new parent outcome group. + */ + parent_outcome_group_id?: number; + /** + * The new outcome group title. + */ + title?: string; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_groups/{id}'; +}; + +export type UpdateOutcomeGroupCoursesResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type UpdateOutcomeGroupCoursesResponse = UpdateOutcomeGroupCoursesResponses[keyof UpdateOutcomeGroupCoursesResponses]; + +export type ImportOutcomeGroupCoursesData = { + body: { + /** + * If true, perform action asynchronously. In that case, this endpoint + * will return a Progress object instead of an OutcomeGroup. + * Use the {api:ProgressController#show progress endpoint} + * to query the status of the operation. The imported outcome group id + * and url will be returned in the results of the Progress object + * as "outcome_group_id" and "outcome_group_url" + */ + async?: boolean; + /** + * The ID of the source outcome group. + */ + source_outcome_group_id: number; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_groups/{id}/import'; +}; + +export type ImportOutcomeGroupCoursesResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type ImportOutcomeGroupCoursesResponse = ImportOutcomeGroupCoursesResponses[keyof ImportOutcomeGroupCoursesResponses]; + +export type ListLinkedOutcomesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * The detail level of the outcomes. Defaults to "abbrev". + * Specify "full" for more information. + */ + outcome_style?: string; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/outcome_groups/{id}/outcomes'; +}; + +export type ListLinkedOutcomesCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListLinkedOutcomesCoursesResponse = ListLinkedOutcomesCoursesResponses[keyof ListLinkedOutcomesCoursesResponses]; + +export type CreateLinkOutcomeCoursesData = { + body?: { + /** + * The new calculation int. Only applies if the calculation_method is "decaying_average" or "n_mastery" + */ + calculation_int?: number; + /** + * The new calculation method. Defaults to "highest" + */ + calculation_method?: 'decaying_average' | 'n_mastery' | 'latest' | 'highest'; + /** + * The description of the new outcome. + */ + description?: string; + /** + * A friendly name shown in reports for outcomes with cryptic titles, + * such as common core standards names. + */ + display_name?: string; + /** + * The mastery threshold for the embedded rubric criterion. + */ + mastery_points?: number; + /** + * The ID of the old outcome group. Only used if outcome_id is present. + */ + move_from?: number; + /** + * The ID of the existing outcome to link. + */ + outcome_id?: number; + /** + * The description of a rating level for the embedded rubric criterion. + */ + 'ratings[description]'?: Array; + /** + * The points corresponding to a rating level for the embedded rubric criterion. + */ + 'ratings[points]'?: Array; + /** + * The title of the new outcome. Required if outcome_id is absent. + */ + title?: string; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_groups/{id}/outcomes'; +}; + +export type CreateLinkOutcomeCoursesResponses = { + /** + * No response was specified + */ + 200: OutcomeLink; +}; + +export type CreateLinkOutcomeCoursesResponse = CreateLinkOutcomeCoursesResponses[keyof CreateLinkOutcomeCoursesResponses]; + +export type UnlinkOutcomeCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + /** + * ID + */ + outcome_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_groups/{id}/outcomes/{outcome_id}'; +}; + +export type UnlinkOutcomeCoursesResponses = { + /** + * No response was specified + */ + 200: OutcomeLink; +}; + +export type UnlinkOutcomeCoursesResponse = UnlinkOutcomeCoursesResponses[keyof UnlinkOutcomeCoursesResponses]; + +export type CreateLinkOutcomeCoursesOutcomeIdData = { + body?: { + /** + * The new calculation int. Only applies if the calculation_method is "decaying_average" or "n_mastery" + */ + calculation_int?: number; + /** + * The new calculation method. Defaults to "highest" + */ + calculation_method?: 'decaying_average' | 'n_mastery' | 'latest' | 'highest'; + /** + * The description of the new outcome. + */ + description?: string; + /** + * A friendly name shown in reports for outcomes with cryptic titles, + * such as common core standards names. + */ + display_name?: string; + /** + * The mastery threshold for the embedded rubric criterion. + */ + mastery_points?: number; + /** + * The ID of the old outcome group. Only used if outcome_id is present. + */ + move_from?: number; + /** + * The description of a rating level for the embedded rubric criterion. + */ + 'ratings[description]'?: Array; + /** + * The points corresponding to a rating level for the embedded rubric criterion. + */ + 'ratings[points]'?: Array; + /** + * The title of the new outcome. Required if outcome_id is absent. + */ + title?: string; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + /** + * The ID of the existing outcome to link. + */ + outcome_id: number; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_groups/{id}/outcomes/{outcome_id}'; +}; + +export type CreateLinkOutcomeCoursesOutcomeIdResponses = { + /** + * No response was specified + */ + 200: OutcomeLink; +}; + +export type CreateLinkOutcomeCoursesOutcomeIdResponse = CreateLinkOutcomeCoursesOutcomeIdResponses[keyof CreateLinkOutcomeCoursesOutcomeIdResponses]; + +export type ListSubgroupsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/outcome_groups/{id}/subgroups'; +}; + +export type ListSubgroupsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListSubgroupsCoursesResponse = ListSubgroupsCoursesResponses[keyof ListSubgroupsCoursesResponses]; + +export type CreateSubgroupCoursesData = { + body: { + /** + * The description of the new outcome group. + */ + description?: string; + /** + * The title of the new outcome group. + */ + title: string; + /** + * A custom GUID for the learning standard + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_groups/{id}/subgroups'; +}; + +export type CreateSubgroupCoursesResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type CreateSubgroupCoursesResponse = CreateSubgroupCoursesResponses[keyof CreateSubgroupCoursesResponses]; + +export type ImportOutcomesCoursesData = { + body?: { + /** + * There are two ways to post outcome import data - either via a + * application/x-www-form-urlencoded form-field-style attachment, or via a non-multipart + * raw post request. + * + * 'attachment' is required for application/x-www-form-urlencoded style posts. Assumed to + * be outcome data from a file upload form field named 'attachment'. + * + * Examples: + * curl -F attachment=@ -H "Authorization: Bearer " \ + * 'https:///api/v1/accounts//outcome_imports?import_type=instructure_csv' + * curl -F attachment=@ -H "Authorization: Bearer " \ + * 'https:///api/v1/courses//outcome_imports?import_type=instructure_csv' + * + * If you decide to do a raw post, you can skip the 'attachment' argument, + * but you will then be required to provide a suitable Content-Type header. + * You are encouraged to also provide the 'extension' argument. + * + * Examples: + * curl -H 'Content-Type: text/csv' --data-binary @.csv \ + * -H "Authorization: Bearer " \ + * 'https:///api/v1/accounts//outcome_imports?import_type=instructure_csv' + * + * curl -H 'Content-Type: text/csv' --data-binary @.csv \ + * -H "Authorization: Bearer " \ + * 'https:///api/v1/courses//outcome_imports?import_type=instructure_csv' + */ + attachment?: string; + /** + * Recommended for raw post request style imports. This field will be used to + * distinguish between csv and other file format extensions that + * would usually be provided with the filename in the multipart post request + * scenario. If not provided, this value will be inferred from the + * Content-Type, falling back to csv-file format if all else fails. + */ + extension?: string; + /** + * Choose the data format for reading outcome data. With a standard Canvas + * install, this option can only be 'instructure_csv', and if unprovided, + * will be assumed to be so. Can be part of the query string. + */ + import_type?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_imports'; +}; + +export type ImportOutcomesCoursesResponses = { + /** + * No response was specified + */ + 200: OutcomeImport; +}; + +export type ImportOutcomesCoursesResponse = ImportOutcomesCoursesResponses[keyof ImportOutcomesCoursesResponses]; + +export type GetOutcomeImportStatusCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/outcome_imports/{id}'; +}; + +export type GetOutcomeImportStatusCoursesResponses = { + /** + * No response was specified + */ + 200: OutcomeImport; +}; + +export type GetOutcomeImportStatusCoursesResponse = GetOutcomeImportStatusCoursesResponses[keyof GetOutcomeImportStatusCoursesResponses]; + +export type GetOutcomeResultsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * If specified, only the users whose ids are given will be included in the + * results. SIS ids can be used, prefixed by "sis_user_id:". + * It is an error to specify an id for a user who is not a student in + * the context. + */ + user_ids?: Array; + /** + * If specified, only the outcomes whose ids are given will be included in the + * results. it is an error to specify an id for an outcome which is not linked + * to the context. + */ + outcome_ids?: Array; + /** + * [String, "alignments"|"outcomes"|"outcomes.alignments"|"outcome_groups"|"outcome_links"|"outcome_paths"|"users"] + * Specify additional collections to be side loaded with the result. + * "alignments" includes only the alignments referenced by the returned + * results. + * "outcomes.alignments" includes all alignments referenced by outcomes in the + * context. + */ + include?: Array; + /** + * If true, results that are hidden from the learning mastery gradebook and student rollup + * scores will be included + */ + include_hidden?: boolean; + }; + url: '/v1/courses/{course_id}/outcome_results'; +}; + +export type GetOutcomeResultsResponses = { + /** + * Assessment Outcome Results and optional info (enabled via "include" parameter) + */ + 200: OutcomeResultResponse; +}; + +export type GetOutcomeResultsResponse = GetOutcomeResultsResponses[keyof GetOutcomeResultsResponses]; + +export type GetOutcomeResultRollupsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * If specified, instead of returning one rollup for each user, all the user + * rollups will be combined into one rollup for the course that will contain + * the average (or median, see below) rollup score for each outcome. + */ + aggregate?: 'course'; + /** + * If aggregate rollups requested, then this value determines what + * statistic is used for the aggregate. Defaults to "mean" if this value + * is not specified. + */ + aggregate_stat?: 'mean' | 'median'; + /** + * If specified, only the users whose ids are given will be included in the + * results or used in an aggregate result. it is an error to specify an id + * for a user who is not a student in the context + */ + user_ids?: Array; + /** + * If specified, only the outcomes whose ids are given will be included in the + * results. it is an error to specify an id for an outcome which is not linked + * to the context. + */ + outcome_ids?: Array; + /** + * [String, "courses"|"outcomes"|"outcomes.alignments"|"outcome_groups"|"outcome_links"|"outcome_paths"|"users"] + * Specify additional collections to be side loaded with the result. + */ + include?: Array; + /** + * Specify additional values to exclude. "missing_user_rollups" excludes + * rollups for users without results. + */ + exclude?: Array<'missing_user_rollups'>; + /** + * If specified, sorts outcome result rollups. "student" sorting will sort + * by a user's sortable name. "outcome" sorting will sort by the given outcome's + * rollup score. The latter requires specifying the "sort_outcome_id" parameter. + * By default, the sort order is ascending. + */ + sort_by?: 'student' | 'outcome'; + /** + * If outcome sorting requested, then this determines which outcome to use + * for rollup score sorting. + */ + sort_outcome_id?: number; + /** + * If sorting requested, then this allows changing the default sort order of + * ascending to descending. + */ + sort_order?: 'asc' | 'desc'; + }; + url: '/v1/courses/{course_id}/outcome_rollups'; +}; + +export type GetOutcomeResultRollupsResponses = { + /** + * Assessment Outcome Rollup Results and optional info (enabled via the "include" parameter) + */ + 200: OutcomeRollupResponse; +}; + +export type GetOutcomeResultRollupsResponse = GetOutcomeResultRollupsResponses[keyof GetOutcomeResultRollupsResponses]; + +export type ListPagesCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * Sort results by this field. + */ + sort?: 'title' | 'created_at' | 'updated_at'; + /** + * The sorting order. Defaults to 'asc'. + */ + order?: 'asc' | 'desc'; + /** + * The partial title of the pages to match and return. + */ + search_term?: string; + /** + * If true, include only published paqes. If false, exclude published + * pages. If not present, do not filter on published status. + */ + published?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/pages'; +}; + +export type ListPagesCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListPagesCoursesResponse = ListPagesCoursesResponses[keyof ListPagesCoursesResponses]; + +export type CreatePageCoursesData = { + body: { + /** + * The content for the new page. + */ + 'wiki_page[body]'?: string; + /** + * Which user roles are allowed to edit this page. Any combination + * of these roles is allowed (separated by commas). + * + * "teachers":: Allows editing by teachers in the course. + * "students":: Allows editing by students in the course. + * "members":: For group wikis, allows editing by members of the group. + * "public":: Allows editing by any user. + */ + 'wiki_page[editing_roles]'?: 'teachers' | 'students' | 'members' | 'public'; + /** + * Set an unhidden page as the front page (if true) + */ + 'wiki_page[front_page]'?: boolean; + /** + * Whether participants should be notified when this page changes. + */ + 'wiki_page[notify_of_update]'?: boolean; + /** + * Whether the page is published (true) or draft state (false). + */ + 'wiki_page[published]'?: boolean; + /** + * The title for the new page. + */ + 'wiki_page[title]': string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/pages'; +}; + +export type CreatePageCoursesResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type CreatePageCoursesResponse = CreatePageCoursesResponses[keyof CreatePageCoursesResponses]; + +export type DeletePageCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + url: string; + }; + query?: never; + url: '/v1/courses/{course_id}/pages/{url}'; +}; + +export type DeletePageCoursesResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type DeletePageCoursesResponse = DeletePageCoursesResponses[keyof DeletePageCoursesResponses]; + +export type ShowPageCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + url: string; + }; + query?: never; + url: '/v1/courses/{course_id}/pages/{url}'; +}; + +export type ShowPageCoursesResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type ShowPageCoursesResponse = ShowPageCoursesResponses[keyof ShowPageCoursesResponses]; + +export type UpdateCreatePageCoursesData = { + body?: { + /** + * The content for the new page. + */ + 'wiki_page[body]'?: string; + /** + * Which user roles are allowed to edit this page. Any combination + * of these roles is allowed (separated by commas). + * + * "teachers":: Allows editing by teachers in the course. + * "students":: Allows editing by students in the course. + * "members":: For group wikis, allows editing by members of the group. + * "public":: Allows editing by any user. + */ + 'wiki_page[editing_roles]'?: 'teachers' | 'students' | 'members' | 'public'; + /** + * Set an unhidden page as the front page (if true) + */ + 'wiki_page[front_page]'?: boolean; + /** + * Whether participants should be notified when this page changes. + */ + 'wiki_page[notify_of_update]'?: boolean; + /** + * Whether the page is published (true) or draft state (false). + */ + 'wiki_page[published]'?: boolean; + /** + * The title for the new page. NOTE: changing a page's title will change its + * url. The updated url will be returned in the result. + */ + 'wiki_page[title]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + url: string; + }; + query?: never; + url: '/v1/courses/{course_id}/pages/{url}'; +}; + +export type UpdateCreatePageCoursesResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type UpdateCreatePageCoursesResponse = UpdateCreatePageCoursesResponses[keyof UpdateCreatePageCoursesResponses]; + +export type DuplicatePageData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + url: string; + }; + query?: never; + url: '/v1/courses/{course_id}/pages/{url}/duplicate'; +}; + +export type DuplicatePageResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type DuplicatePageResponse = DuplicatePageResponses[keyof DuplicatePageResponses]; + +export type ListRevisionsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + url: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/pages/{url}/revisions'; +}; + +export type ListRevisionsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListRevisionsCoursesResponse = ListRevisionsCoursesResponses[keyof ListRevisionsCoursesResponses]; + +export type ShowRevisionCoursesLatestData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + url: string; + }; + query?: { + /** + * If set, exclude page content from results + */ + summary?: boolean; + }; + url: '/v1/courses/{course_id}/pages/{url}/revisions/latest'; +}; + +export type ShowRevisionCoursesLatestResponses = { + /** + * No response was specified + */ + 200: PageRevision; +}; + +export type ShowRevisionCoursesLatestResponse = ShowRevisionCoursesLatestResponses[keyof ShowRevisionCoursesLatestResponses]; + +export type ShowRevisionCoursesRevisionIdData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + url: string; + /** + * ID + */ + revision_id: string; + }; + query?: { + /** + * If set, exclude page content from results + */ + summary?: boolean; + }; + url: '/v1/courses/{course_id}/pages/{url}/revisions/{revision_id}'; +}; + +export type ShowRevisionCoursesRevisionIdResponses = { + /** + * No response was specified + */ + 200: PageRevision; +}; + +export type ShowRevisionCoursesRevisionIdResponse = ShowRevisionCoursesRevisionIdResponses[keyof ShowRevisionCoursesRevisionIdResponses]; + +export type RevertToRevisionCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + url: string; + /** + * The revision to revert to (use the + * {api:WikiPagesApiController#revisions List Revisions API} to see + * available revisions) + */ + revision_id: number; + }; + query?: never; + url: '/v1/courses/{course_id}/pages/{url}/revisions/{revision_id}'; +}; + +export type RevertToRevisionCoursesResponses = { + /** + * No response was specified + */ + 200: PageRevision; +}; + +export type RevertToRevisionCoursesResponse = RevertToRevisionCoursesResponses[keyof RevertToRevisionCoursesResponses]; + +export type CoursePermissionData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * List of permissions to check against the authenticated user. + * Permission names are documented in the {api:RoleOverridesController#add_role Create a role} endpoint. + */ + permissions?: Array; + }; + url: '/v1/courses/{course_id}/permissions'; +}; + +export type CoursePermissionResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type CoursePermissionResponse = CoursePermissionResponses[keyof CoursePermissionResponses]; + +export type ListPotentialMembersCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/potential_collaborators'; +}; + +export type ListPotentialMembersCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListPotentialMembersCoursesResponse = ListPotentialMembersCoursesResponses[keyof ListPotentialMembersCoursesResponses]; + +export type PreviewProcessedHtmlCourseData = { + body?: { + /** + * The html content to process + */ + html?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/preview_html'; +}; + +export type PreviewProcessedHtmlCourseResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SetExtensionsForStudentQuizSubmissionsData = { + body: { + /** + * The number of minutes to extend the quiz beyond the quiz's current + * ending time. This is mutually exclusive to extend_from_now. This is + * limited to 1440 minutes (24 hours) + */ + extend_from_end_at?: number; + /** + * The number of minutes to extend the quiz from the current time. This is + * mutually exclusive to extend_from_end_at. This is limited to 1440 + * minutes (24 hours) + */ + extend_from_now?: number; + /** + * Number of times the student is allowed to re-take the quiz over the + * multiple-attempt limit. This is limited to 1000 attempts or less. + */ + extra_attempts?: number; + /** + * The number of extra minutes to allow for all attempts. This will + * add to the existing time limit on the submission. This is limited to + * 10080 minutes (1 week) + */ + extra_time?: number; + /** + * Allow the student to take the quiz even if it's locked for + * everyone else. + */ + manually_unlocked?: boolean; + /** + * The ID of the user we want to add quiz extensions for. + */ + user_id: number; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quiz_extensions'; +}; + +export type SetExtensionsForStudentQuizSubmissionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListQuizzesInCourseData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The partial title of the quizzes to match and return. + */ + search_term?: string; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/quizzes'; +}; + +export type ListQuizzesInCourseResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListQuizzesInCourseResponse = ListQuizzesInCourseResponses[keyof ListQuizzesInCourseResponses]; + +export type CreateQuizData = { + body: { + /** + * Restricts access to the quiz with a password. + * For no access code restriction, set to null. + * Defaults to null. + */ + 'quiz[access_code]'?: string; + /** + * Number of times a student is allowed to take a quiz. + * Set to -1 for unlimited attempts. + * Defaults to 1. + */ + 'quiz[allowed_attempts]'?: number; + /** + * The assignment group id to put the assignment in. Defaults to the top + * assignment group in the course. Only valid if the quiz is graded, i.e. if + * quiz_type is "assignment" or "graded_survey". + */ + 'quiz[assignment_group_id]'?: number; + /** + * Only valid if one_question_at_a_time=true + * If true, questions are locked after answering. + * Defaults to false. + */ + 'quiz[cant_go_back]'?: boolean; + /** + * A description of the quiz. + */ + 'quiz[description]'?: string; + /** + * The day/time the quiz is due. + * Accepts times in ISO 8601 format, e.g. 2011-10-21T18:48Z. + */ + 'quiz[due_at]'?: string; + /** + * Only valid if show_correct_answers=true + * If set, the correct answers will stop being visible once this date has + * passed. Otherwise, the correct answers will be visible indefinitely. + */ + 'quiz[hide_correct_answers_at]'?: string; + /** + * Dictates whether or not quiz results are hidden from students. + * If null, students can see their results after any attempt. + * If "always", students can never see their results. + * If "until_after_last_attempt", students can only see results after their + * last attempt. (Only valid if allowed_attempts > 1). Defaults to null. + */ + 'quiz[hide_results]'?: 'always' | 'until_after_last_attempt'; + /** + * Restricts access to the quiz to computers in a specified IP range. + * Filters can be a comma-separated list of addresses, or an address followed by a mask + * + * Examples: + * "192.168.217.1" + * "192.168.217.1/24" + * "192.168.217.1/255.255.255.0" + * + * For no IP filter restriction, set to null. + * Defaults to null. + */ + 'quiz[ip_filter]'?: string; + /** + * The day/time the quiz is locked for students. + * Accepts times in ISO 8601 format, e.g. 2011-10-21T18:48Z. + */ + 'quiz[lock_at]'?: string; + /** + * If true, shows quiz to student one question at a time. + * Defaults to false. + */ + 'quiz[one_question_at_a_time]'?: boolean; + /** + * Whether students should be prevented from viewing their quiz results past + * the first time (right after they turn the quiz in.) + * Only valid if "hide_results" is not set to "always". + * Defaults to false. + */ + 'quiz[one_time_results]'?: boolean; + /** + * Whether this quiz is only visible to overrides (Only useful if + * 'differentiated assignments' account setting is on) + * Defaults to false. + */ + 'quiz[only_visible_to_overrides]'?: boolean; + /** + * Whether the quiz should have a draft state of published or unpublished. + * NOTE: If students have started taking the quiz, or there are any + * submissions for the quiz, you may not unpublish a quiz and will recieve + * an error. + */ + 'quiz[published]'?: boolean; + /** + * The type of quiz. + */ + 'quiz[quiz_type]'?: 'practice_quiz' | 'assignment' | 'graded_survey' | 'survey'; + /** + * Required and only valid if allowed_attempts > 1. + * Scoring policy for a quiz that students can take multiple times. + * Defaults to "keep_highest". + */ + 'quiz[scoring_policy]'?: 'keep_highest' | 'keep_latest'; + /** + * Only valid if hide_results=null + * If false, hides correct answers from students when quiz results are viewed. + * Defaults to true. + */ + 'quiz[show_correct_answers]'?: boolean; + /** + * Only valid if show_correct_answers=true + * If set, the correct answers will be visible by students only after this + * date, otherwise the correct answers are visible once the student hands in + * their quiz submission. + */ + 'quiz[show_correct_answers_at]'?: string; + /** + * Only valid if show_correct_answers=true and allowed_attempts > 1 + * If true, hides correct answers from students when quiz results are viewed + * until they submit the last attempt for the quiz. + * Defaults to false. + */ + 'quiz[show_correct_answers_last_attempt]'?: boolean; + /** + * If true, quiz answers for multiple choice questions will be randomized for + * each student. Defaults to false. + */ + 'quiz[shuffle_answers]'?: boolean; + /** + * Time limit to take this quiz, in minutes. Set to null for no time limit. + * Defaults to null. + */ + 'quiz[time_limit]'?: number; + /** + * The quiz title. + */ + 'quiz[title]': string; + /** + * The day/time the quiz is unlocked for students. + * Accepts times in ISO 8601 format, e.g. 2011-10-21T18:48Z. + */ + 'quiz[unlock_at]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes'; +}; + +export type CreateQuizResponses = { + /** + * No response was specified + */ + 200: Quiz; +}; + +export type CreateQuizResponse = CreateQuizResponses[keyof CreateQuizResponses]; + +export type RetrieveAssignmentOverriddenDatesForQuizzesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * An array of quiz IDs. If omitted, overrides for all quizzes available to + * the operating user will be returned. + */ + 'quiz_assignment_overrides[0][quiz_ids]'?: Array; + }; + url: '/v1/courses/{course_id}/quizzes/assignment_overrides'; +}; + +export type RetrieveAssignmentOverriddenDatesForQuizzesResponses = { + /** + * No response was specified + */ + 200: QuizAssignmentOverrideSetContainer; +}; + +export type RetrieveAssignmentOverriddenDatesForQuizzesResponse = RetrieveAssignmentOverriddenDatesForQuizzesResponses[keyof RetrieveAssignmentOverriddenDatesForQuizzesResponses]; + +export type DeleteQuizData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{id}'; +}; + +export type DeleteQuizResponses = { + /** + * No response was specified + */ + 200: Quiz; +}; + +export type DeleteQuizResponse = DeleteQuizResponses[keyof DeleteQuizResponses]; + +export type GetSingleQuizData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{id}'; +}; + +export type GetSingleQuizResponses = { + /** + * No response was specified + */ + 200: Quiz; +}; + +export type GetSingleQuizResponse = GetSingleQuizResponses[keyof GetSingleQuizResponses]; + +export type EditQuizData = { + body?: { + /** + * If true, notifies users that the quiz has changed. + * Defaults to true + */ + 'quiz[notify_of_update]'?: boolean; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{id}'; +}; + +export type EditQuizResponses = { + /** + * No response was specified + */ + 200: Quiz; +}; + +export type EditQuizResponse = EditQuizResponses[keyof EditQuizResponses]; + +export type ReorderQuizItemsData = { + body: { + /** + * The associated item's unique identifier + */ + 'order[id]': Array; + /** + * The type of item is either 'question' or 'group' + */ + 'order[type]'?: 'question' | 'group'; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{id}/reorder'; +}; + +export type ReorderQuizItemsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SendMessageToUnsubmittedOrSubmittedUsersForQuizData = { + body?: { + /** + * - Body and recipients to send the message to. + */ + conversations?: unknown; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{id}/submission_users/message'; +}; + +export type SendMessageToUnsubmittedOrSubmittedUsersForQuizResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ValidateQuizAccessCodeData = { + body: { + /** + * The access code being validated + */ + access_code: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{id}/validate_access_code'; +}; + +export type ValidateQuizAccessCodeResponses = { + /** + * No response was specified + */ + 200: boolean; +}; + +export type ValidateQuizAccessCodeResponse = ValidateQuizAccessCodeResponses[keyof ValidateQuizAccessCodeResponses]; + +export type SetExtensionsForStudentQuizData = { + body: { + /** + * The number of minutes to extend the quiz beyond the quiz's current ending time. This is mutually exclusive to extend_from_now. This is limited to 1440 minutes (24 hours) + */ + 'quiz_extensions[extend_from_end_at]'?: Array; + /** + * The number of minutes to extend the quiz from the current time. This is + * mutually exclusive to extend_from_end_at. This is limited to 1440 + * minutes (24 hours) + */ + 'quiz_extensions[extend_from_now]'?: Array; + /** + * Number of times the student is allowed to re-take the quiz over the + * multiple-attempt limit. This is limited to 1000 attempts or less. + */ + 'quiz_extensions[extra_attempts]'?: Array; + /** + * The number of extra minutes to allow for all attempts. This will + * add to the existing time limit on the submission. This is limited to + * 10080 minutes (1 week) + */ + 'quiz_extensions[extra_time]'?: Array; + /** + * Allow the student to take the quiz even if it's locked for + * everyone else. + */ + 'quiz_extensions[manually_unlocked]'?: Array; + /** + * The ID of the user we want to add quiz extensions for. + */ + 'quiz_extensions[user_id]': Array; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/extensions'; +}; + +export type SetExtensionsForStudentQuizResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateQuestionGroupData = { + body?: { + /** + * The id of the assessment question bank to pull questions from. + */ + 'quiz_groups[assessment_question_bank_id]'?: Array; + /** + * The name of the question group. + */ + 'quiz_groups[name]'?: Array; + /** + * The number of questions to randomly select for this group. + */ + 'quiz_groups[pick_count]'?: Array; + /** + * The number of points to assign to each question in the group. + */ + 'quiz_groups[question_points]'?: Array; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/groups'; +}; + +export type CreateQuestionGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteQuestionGroupData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/groups/{id}'; +}; + +export type DeleteQuestionGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleQuizGroupData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/groups/{id}'; +}; + +export type GetSingleQuizGroupResponses = { + /** + * No response was specified + */ + 200: QuizGroup; +}; + +export type GetSingleQuizGroupResponse = GetSingleQuizGroupResponses[keyof GetSingleQuizGroupResponses]; + +export type UpdateQuestionGroupData = { + body?: { + /** + * The name of the question group. + */ + 'quiz_groups[name]'?: Array; + /** + * The number of questions to randomly select for this group. + */ + 'quiz_groups[pick_count]'?: Array; + /** + * The number of points to assign to each question in the group. + */ + 'quiz_groups[question_points]'?: Array; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/groups/{id}'; +}; + +export type UpdateQuestionGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ReorderQuestionGroupsData = { + body: { + /** + * The associated item's unique identifier + */ + 'order[id]': Array; + /** + * The type of item is always 'question' for a group + */ + 'order[type]'?: 'question'; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/groups/{id}/reorder'; +}; + +export type ReorderQuestionGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetAvailableQuizIpFiltersData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/ip_filters'; +}; + +export type GetAvailableQuizIpFiltersResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListQuestionsInQuizOrSubmissionData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: { + /** + * If specified, the endpoint will return the questions that were presented + * for that submission. This is useful if the quiz has been modified after + * the submission was created and the latest quiz version's set of questions + * does not match the submission's. + * NOTE: you must specify quiz_submission_attempt as well if you specify this + * parameter. + */ + quiz_submission_id?: number; + /** + * The attempt of the submission you want the questions for. + */ + quiz_submission_attempt?: number; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/questions'; +}; + +export type ListQuestionsInQuizOrSubmissionResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListQuestionsInQuizOrSubmissionResponse = ListQuestionsInQuizOrSubmissionResponses[keyof ListQuestionsInQuizOrSubmissionResponses]; + +export type CreateSingleQuizQuestionData = { + body?: { + /** + * no description + */ + 'question[answers]'?: unknown; + /** + * The comment to display if the student answers the question correctly. + */ + 'question[correct_comments]'?: string; + /** + * The comment to display if the student answers incorrectly. + */ + 'question[incorrect_comments]'?: string; + /** + * The comment to display regardless of how the student answered. + */ + 'question[neutral_comments]'?: string; + /** + * The maximum amount of points received for answering this question correctly. + */ + 'question[points_possible]'?: number; + /** + * The order in which the question will be displayed in the quiz in relation to other questions. + */ + 'question[position]'?: number; + /** + * The name of the question. + */ + 'question[question_name]'?: string; + /** + * The text of the question. + */ + 'question[question_text]'?: string; + /** + * The type of question. Multiple optional fields depend upon the type of question to be used. + */ + 'question[question_type]'?: 'calculated_question' | 'essay_question' | 'file_upload_question' | 'fill_in_multiple_blanks_question' | 'matching_question' | 'multiple_answers_question' | 'multiple_choice_question' | 'multiple_dropdowns_question' | 'numerical_question' | 'short_answer_question' | 'text_only_question' | 'true_false_question'; + /** + * The id of the quiz group to assign the question to. + */ + 'question[quiz_group_id]'?: number; + /** + * no description + */ + 'question[text_after_answers]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/questions'; +}; + +export type CreateSingleQuizQuestionResponses = { + /** + * No response was specified + */ + 200: QuizQuestion; +}; + +export type CreateSingleQuizQuestionResponse = CreateSingleQuizQuestionResponses[keyof CreateSingleQuizQuestionResponses]; + +export type DeleteQuizQuestionData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * The associated quiz's unique identifier + */ + quiz_id: number; + /** + * The quiz question's unique identifier + */ + id: number; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/questions/{id}'; +}; + +export type DeleteQuizQuestionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleQuizQuestionData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * The quiz question unique identifier. + */ + id: number; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/questions/{id}'; +}; + +export type GetSingleQuizQuestionResponses = { + /** + * No response was specified + */ + 200: QuizQuestion; +}; + +export type GetSingleQuizQuestionResponse = GetSingleQuizQuestionResponses[keyof GetSingleQuizQuestionResponses]; + +export type UpdateExistingQuizQuestionData = { + body?: { + /** + * no description + */ + 'question[answers]'?: unknown; + /** + * The comment to display if the student answers the question correctly. + */ + 'question[correct_comments]'?: string; + /** + * The comment to display if the student answers incorrectly. + */ + 'question[incorrect_comments]'?: string; + /** + * The comment to display regardless of how the student answered. + */ + 'question[neutral_comments]'?: string; + /** + * The maximum amount of points received for answering this question correctly. + */ + 'question[points_possible]'?: number; + /** + * The order in which the question will be displayed in the quiz in relation to other questions. + */ + 'question[position]'?: number; + /** + * The name of the question. + */ + 'question[question_name]'?: string; + /** + * The text of the question. + */ + 'question[question_text]'?: string; + /** + * The type of question. Multiple optional fields depend upon the type of question to be used. + */ + 'question[question_type]'?: 'calculated_question' | 'essay_question' | 'file_upload_question' | 'fill_in_multiple_blanks_question' | 'matching_question' | 'multiple_answers_question' | 'multiple_choice_question' | 'multiple_dropdowns_question' | 'numerical_question' | 'short_answer_question' | 'text_only_question' | 'true_false_question'; + /** + * The id of the quiz group to assign the question to. + */ + 'question[quiz_group_id]'?: number; + /** + * no description + */ + 'question[text_after_answers]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * The associated quiz's unique identifier. + */ + quiz_id: number; + /** + * The quiz question's unique identifier. + */ + id: number; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/questions/{id}'; +}; + +export type UpdateExistingQuizQuestionResponses = { + /** + * No response was specified + */ + 200: QuizQuestion; +}; + +export type UpdateExistingQuizQuestionResponse = UpdateExistingQuizQuestionResponses[keyof UpdateExistingQuizQuestionResponses]; + +export type RetrieveAllQuizReportsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: { + /** + * Whether to retrieve reports that consider all the submissions or only + * the most recent. Defaults to false, ignored for item_analysis reports. + */ + includes_all_versions?: boolean; + }; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/reports'; +}; + +export type RetrieveAllQuizReportsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type RetrieveAllQuizReportsResponse = RetrieveAllQuizReportsResponses[keyof RetrieveAllQuizReportsResponses]; + +export type CreateQuizReportData = { + body: { + /** + * Whether the output should include documents for the file and/or progress objects associated with this report. (Note: JSON-API only) + */ + include?: 'file' | 'progress'; + /** + * Whether the report should consider all submissions or only the most + * recent. Defaults to false, ignored for item_analysis. + */ + 'quiz_report[includes_all_versions]'?: boolean; + /** + * The type of report to be generated. + */ + 'quiz_report[report_type]': 'student_analysis' | 'item_analysis'; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/reports'; +}; + +export type CreateQuizReportResponses = { + /** + * No response was specified + */ + 200: QuizReport; +}; + +export type CreateQuizReportResponse = CreateQuizReportResponses[keyof CreateQuizReportResponses]; + +export type AbortGenerationOfReportOrRemovePreviouslyGeneratedOneData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/reports/{id}'; +}; + +export type AbortGenerationOfReportOrRemovePreviouslyGeneratedOneResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetQuizReportData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * Whether the output should include documents for the file and/or progress + * objects associated with this report. (Note: JSON-API only) + */ + include?: 'file' | 'progress'; + }; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/reports/{id}'; +}; + +export type GetQuizReportResponses = { + /** + * No response was specified + */ + 200: QuizReport; +}; + +export type GetQuizReportResponse = GetQuizReportResponses[keyof GetQuizReportResponses]; + +export type FetchingLatestQuizStatisticsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: { + /** + * Whether the statistics report should include all submissions attempts. + */ + all_versions?: boolean; + }; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/statistics'; +}; + +export type FetchingLatestQuizStatisticsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetQuizSubmissionData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: { + /** + * Associations to include with the quiz submission. + */ + include?: 'submission' | 'quiz' | 'user'; + }; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submission'; +}; + +export type GetQuizSubmissionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetAllQuizSubmissionsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: { + /** + * Associations to include with the quiz submission. + */ + include?: 'submission' | 'quiz' | 'user'; + }; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions'; +}; + +export type GetAllQuizSubmissionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateQuizSubmissionStartQuizTakingSessionData = { + body?: { + /** + * Access code for the Quiz, if any. + */ + access_code?: string; + /** + * Whether this should be a preview QuizSubmission and not count towards + * the user's course record. Teachers only. + */ + preview?: boolean; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions'; +}; + +export type CreateQuizSubmissionStartQuizTakingSessionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UploadFileQuizSubmissionData = { + body?: { + /** + * The name of the quiz submission file + */ + name?: string; + /** + * How to handle duplicate names + */ + on_duplicate?: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/self/files'; +}; + +export type UploadFileQuizSubmissionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleQuizSubmissionData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * Associations to include with the quiz submission. + */ + include?: 'submission' | 'quiz' | 'user'; + }; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}'; +}; + +export type GetSingleQuizSubmissionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateStudentQuestionScoresAndCommentsData = { + body: { + /** + * The attempt number of the quiz submission that should be updated. This + * attempt MUST be already completed. + */ + 'quiz_submissions[attempt]': Array; + /** + * Amount of positive or negative points to fudge the total score by. + */ + 'quiz_submissions[fudge_points]'?: Array; + /** + * A set of scores and comments for each question answered by the student. + * The keys are the question IDs, and the values are hashes of `score` and + * `comment` entries. See {Appendix: Manual Scoring} for more on this + * parameter. + */ + 'quiz_submissions[questions]'?: Array; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}'; +}; + +export type UpdateStudentQuestionScoresAndCommentsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CompleteQuizSubmissionTurnItInData = { + body: { + /** + * Access code for the Quiz, if any. + */ + access_code?: string; + /** + * The attempt number of the quiz submission that should be completed. Note + * that this must be the latest attempt index, as earlier attempts can not + * be modified. + */ + attempt: number; + /** + * The unique validation token you received when this Quiz Submission was + * created. + */ + validation_token: string; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}/complete'; +}; + +export type CompleteQuizSubmissionTurnItInResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RetrieveCapturedEventsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * The specific submission attempt to look up the events for. If unspecified, + * the latest attempt will be used. + */ + attempt?: number; + }; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}/events'; +}; + +export type RetrieveCapturedEventsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SubmitCapturedEventsData = { + body: { + /** + * The submission events to be recorded + */ + quiz_submission_events: Array>; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}/events'; +}; + +export type SubmitCapturedEventsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetCurrentQuizSubmissionTimesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + quiz_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/quizzes/{quiz_id}/submissions/{id}/time'; +}; + +export type GetCurrentQuizSubmissionTimesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListRecentlyLoggedInStudentsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/recent_students'; +}; + +export type ListRecentlyLoggedInStudentsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListRecentlyLoggedInStudentsResponse = ListRecentlyLoggedInStudentsResponses[keyof ListRecentlyLoggedInStudentsResponses]; + +export type ResetCourseData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/reset_content'; +}; + +export type ResetCourseResponses = { + /** + * No response was specified + */ + 200: Course; +}; + +export type ResetCourseResponse = ResetCourseResponses[keyof ResetCourseResponses]; + +export type RedirectToRootOutcomeGroupForContextCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/root_outcome_group'; +}; + +export type RedirectToRootOutcomeGroupForContextCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListRubricsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/rubrics'; +}; + +export type ListRubricsCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleRubricCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * If included, the type of associated rubric assessments to return. If not included, assessments will be omitted. + */ + include?: 'assessments' | 'graded_assessments' | 'peer_assessments'; + /** + * Applicable only if assessments are being returned. If included, returns either all criteria data associated with the assessment, or just the comments. If not included, both data and comments are omitted. + */ + style?: 'full' | 'comments_only'; + }; + url: '/v1/courses/{course_id}/rubrics/{id}'; +}; + +export type GetSingleRubricCoursesResponses = { + /** + * No response was specified + */ + 200: Rubric; +}; + +export type GetSingleRubricCoursesResponse = GetSingleRubricCoursesResponses[keyof GetSingleRubricCoursesResponses]; + +export type ListUsersInCourseSearchUsersData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + /** + * The partial name or full ID of the users to match and return in the results list. + */ + search_term?: string; + /** + * When set, only return users where the user is enrolled as this type. + * "student_view" implies include[]=test_student. + * This argument is ignored if enrollment_role is given. + */ + enrollment_type?: 'teacher' | 'student' | 'student_view' | 'ta' | 'observer' | 'designer'; + /** + * Deprecated + * When set, only return users enrolled with the specified course-level role. This can be + * a role created with the {api:RoleOverridesController#add_role Add Role API} or a + * base role type of 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', + * 'ObserverEnrollment', or 'DesignerEnrollment'. + */ + enrollment_role?: string; + /** + * When set, only return courses where the user is enrolled with the specified + * course-level role. This can be a role created with the + * {api:RoleOverridesController#add_role Add Role API} or a built_in role id with type + * 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'ObserverEnrollment', + * or 'DesignerEnrollment'. + */ + enrollment_role_id?: number; + /** + * - "email": Optional user email. + * - "enrollments": + * Optionally include with each Course the user's current and invited + * enrollments. If the user is enrolled as a student, and the account has + * permission to manage or view all grades, each enrollment will include a + * 'grades' key with 'current_score', 'final_score', 'current_grade' and + * 'final_grade' values. + * - "locked": Optionally include whether an enrollment is locked. + * - "avatar_url": Optionally include avatar_url. + * - "bio": Optionally include each user's bio. + * - "test_student": Optionally include the course's Test Student, + * if present. Default is to not include Test Student. + * - "custom_links": Optionally include plugin-supplied custom links for each student, + * such as analytics information + * - "current_grading_period_scores": if enrollments is included as + * well as this directive, the scores returned in the enrollment + * will be for the current grading period if there is one. A + * 'grading_period_id' value will also be included with the + * scores. if grading_period_id is nil there is no current grading + * period and the score is a total score. + */ + include?: 'email' | 'enrollments' | 'locked' | 'avatar_url' | 'test_student' | 'bio' | 'custom_links' | 'current_grading_period_scores'; + /** + * If this parameter is given and it corresponds to a user in the course, + * the +page+ parameter will be ignored and the page containing the specified user + * will be returned instead. + */ + user_id?: string; + /** + * If included, the course users set will only include users with IDs + * specified by the param. Note: this will not work in conjunction + * with the "user_id" argument but multiple user_ids can be included. + */ + user_ids?: Array; + /** + * When set, only return users where the enrollment workflow state is of one of the given types. + * "active" and "invited" enrollments are returned by default. + */ + enrollment_state?: 'active' | 'invited' | 'rejected' | 'completed' | 'inactive'; + }; + url: '/v1/courses/{course_id}/search_users'; +}; + +export type ListUsersInCourseSearchUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListUsersInCourseSearchUsersResponse = ListUsersInCourseSearchUsersResponses[keyof ListUsersInCourseSearchUsersResponses]; + +export type ListCourseSectionsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * - "students": Associations to include with the group. Note: this is only + * available if you have permission to view users or grades in the course + * - "avatar_url": Include the avatar URLs for students returned. + * - "enrollments": If 'students' is also included, return the section + * enrollment for each student + * - "total_students": Returns the total amount of active and invited students + * for the course section + * - "passback_status": Include the grade passback status. + */ + include?: 'students' | 'avatar_url' | 'enrollments' | 'total_students' | 'passback_status'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/sections'; +}; + +export type ListCourseSectionsResponses = { + /** + * No response was specified + */ + 200: Array
; +}; + +export type ListCourseSectionsResponse = ListCourseSectionsResponses[keyof ListCourseSectionsResponses]; + +export type CreateCourseSectionData = { + body?: { + /** + * Section end date in ISO8601 format. e.g. 2011-01-01T01:00Z + */ + 'course_section[end_at]'?: string; + /** + * The integration_id of the section. Must have manage_sis permission to set. This is ignored if caller does not have permission to set. + */ + 'course_section[integration_id]'?: string; + /** + * The name of the section + */ + 'course_section[name]'?: string; + /** + * Set to true to restrict user enrollments to the start and end dates of the section. + */ + 'course_section[restrict_enrollments_to_section_dates]'?: boolean; + /** + * The sis ID of the section. Must have manage_sis permission to set. This is ignored if caller does not have permission to set. + */ + 'course_section[sis_section_id]'?: string; + /** + * Section start date in ISO8601 format, e.g. 2011-01-01T01:00Z + */ + 'course_section[start_at]'?: string; + /** + * When true, will first try to re-activate a deleted section with matching sis_section_id if possible. + */ + enable_sis_reactivation?: boolean; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/sections'; +}; + +export type CreateCourseSectionResponses = { + /** + * No response was specified + */ + 200: Section; +}; + +export type CreateCourseSectionResponse = CreateCourseSectionResponses[keyof CreateCourseSectionResponses]; + +export type GetSectionInformationCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * - "students": Associations to include with the group. Note: this is only + * available if you have permission to view users or grades in the course + * - "avatar_url": Include the avatar URLs for students returned. + * - "enrollments": If 'students' is also included, return the section + * enrollment for each student + * - "total_students": Returns the total amount of active and invited students + * for the course section + * - "passback_status": Include the grade passback status. + */ + include?: 'students' | 'avatar_url' | 'enrollments' | 'total_students' | 'passback_status'; + }; + url: '/v1/courses/{course_id}/sections/{id}'; +}; + +export type GetSectionInformationCoursesResponses = { + /** + * No response was specified + */ + 200: Section; +}; + +export type GetSectionInformationCoursesResponse = GetSectionInformationCoursesResponses[keyof GetSectionInformationCoursesResponses]; + +export type GetCourseSettingsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/settings'; +}; + +export type GetCourseSettingsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateCourseSettingsData = { + body?: { + /** + * Let students edit or delete their own discussion posts + */ + allow_student_discussion_editing?: boolean; + /** + * Let students create discussion topics + */ + allow_student_discussion_topics?: boolean; + /** + * Let students attach files to discussions + */ + allow_student_forum_attachments?: boolean; + /** + * Let students organize their own groups + */ + allow_student_organized_groups?: boolean; + /** + * Hide grade distribution graphs from students + */ + hide_distribution_graphs?: boolean; + /** + * Hide totals in student grades summary + */ + hide_final_grades?: boolean; + /** + * Limit the number of announcements on the home page if enabled via show_announcements_on_home_page + */ + home_page_announcement_limit?: number; + /** + * Disable comments on announcements + */ + lock_all_announcements?: boolean; + /** + * Restrict students from viewing courses before start date + */ + restrict_student_future_view?: boolean; + /** + * Restrict students from viewing courses after end date + */ + restrict_student_past_view?: boolean; + /** + * Show the most recent announcements on the Course home page (if a Wiki, defaults to five announcements, configurable via home_page_announcement_limit) + */ + show_announcements_on_home_page?: boolean; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/settings'; +}; + +export type UpdateCourseSettingsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListStudentsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/students'; +}; + +export type ListStudentsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListStudentsResponse = ListStudentsResponses[keyof ListStudentsResponses]; + +export type ListSubmissionsForMultipleAssignmentsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * List of student ids to return submissions for. If this argument is + * omitted, return submissions for the calling user. Students may only list + * their own submissions. Observers may only list those of associated + * students. The special id "all" will return submissions for all students + * in the course/section as appropriate. + */ + 'student_ids[]'?: Array; + /** + * List of assignments to return submissions for. If none are given, + * submissions for all assignments are returned. + */ + assignment_ids?: Array; + /** + * If this argument is present, the response will be grouped by student, + * rather than a flat array of submissions. + */ + grouped?: boolean; + /** + * If this argument is set to true, the response will only include + * submissions for assignments that have the post_to_sis flag set to true and + * user enrollments that were added through sis. + */ + post_to_sis?: boolean; + /** + * If this argument is set, the response will only include submissions that + * were submitted after the specified date_time. This will exclude + * submissions that do not have a submitted_at which will exclude unsubmitted + * submissions. + * The value must be formatted as ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + */ + submitted_since?: string; + /** + * If this argument is set, the response will only include submissions that + * were graded after the specified date_time. This will exclude + * submissions that have not been graded. + * The value must be formatted as ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + */ + graded_since?: string; + /** + * The id of the grading period in which submissions are being requested + * (Requires grading periods to exist on the account) + */ + grading_period_id?: number; + /** + * The current status of the submission + */ + workflow_state?: 'submitted' | 'unsubmitted' | 'graded' | 'pending_review'; + /** + * The current state of the enrollments. If omitted will include all + * enrollments that are not deleted. + */ + enrollment_state?: 'active' | 'concluded'; + /** + * If omitted it is set to true. When set to false it will ignore the effective + * state of the student enrollments and use the workflow_state for the + * enrollments. The argument is ignored unless enrollment_state argument is + * also passed. + */ + state_based_on_date?: boolean; + /** + * The order submissions will be returned in. Defaults to "id". Doesn't + * affect results for "grouped" mode. + */ + order?: 'id' | 'graded_at'; + /** + * Determines whether ordered results are returned in ascending or descending + * order. Defaults to "ascending". Doesn't affect results for "grouped" mode. + */ + order_direction?: 'ascending' | 'descending'; + /** + * Associations to include with the group. `total_scores` requires the + * `grouped` argument. + */ + 'include[]'?: 'submission_history' | 'submission_comments' | 'rubric_assessment' | 'assignment' | 'total_scores' | 'visibility' | 'course' | 'user'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/students/submissions'; +}; + +export type ListSubmissionsForMultipleAssignmentsCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListSubmissionsForMultipleAssignmentsCoursesResponse = ListSubmissionsForMultipleAssignmentsCoursesResponses[keyof ListSubmissionsForMultipleAssignmentsCoursesResponses]; + +export type GradeOrCommentOnMultipleSubmissionsCoursesSubmissionsData = { + body?: { + /** + * Specifies which assignment to grade. This argument is not necessary when + * using the assignment-specific endpoints. + */ + 'grade_data[student_id][assignment_id]'?: number; + /** + * See documentation for the excuse argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][excuse]'?: boolean; + /** + * See documentation for the comment[] arguments in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][file_ids]'?: Array; + /** + * no description + */ + 'grade_data[student_id][group_comment]'?: boolean; + /** + * no description + */ + 'grade_data[student_id][media_comment_id]'?: string; + /** + * no description + */ + 'grade_data[student_id][media_comment_type]'?: 'audio' | 'video'; + /** + * See documentation for the posted_grade argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][posted_grade]'?: string; + /** + * See documentation for the rubric_assessment argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][rubric_assessment]'?: unknown; + /** + * no description + */ + 'grade_data[student_id][text_comment]'?: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/submissions/update_grades'; +}; + +export type GradeOrCommentOnMultipleSubmissionsCoursesSubmissionsResponses = { + /** + * No response was specified + */ + 200: Progress; +}; + +export type GradeOrCommentOnMultipleSubmissionsCoursesSubmissionsResponse = GradeOrCommentOnMultipleSubmissionsCoursesSubmissionsResponses[keyof GradeOrCommentOnMultipleSubmissionsCoursesSubmissionsResponses]; + +export type ListAvailableTabsForCourseOrGroupCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * "external":: Optionally include external tool tabs in the returned list of tabs (Only has effect for courses, not groups) + */ + include?: 'external'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/courses/{course_id}/tabs'; +}; + +export type ListAvailableTabsForCourseOrGroupCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateTabForCourseData = { + body?: { + /** + * no description + */ + hidden?: boolean; + /** + * The new position of the tab, 1-based + */ + position?: number; + }; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + tab_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/tabs/{tab_id}'; +}; + +export type UpdateTabForCourseResponses = { + /** + * No response was specified + */ + 200: Tab; +}; + +export type UpdateTabForCourseResponse = UpdateTabForCourseResponses[keyof UpdateTabForCourseResponses]; + +export type CourseTodoItemsData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/todo'; +}; + +export type CourseTodoItemsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RemoveUsageRightsCoursesData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query: { + /** + * List of ids of files to remove associated usage rights from. + */ + file_ids: Array; + /** + * List of ids of folders. Usage rights will be removed from all files in these folders. + */ + folder_ids?: Array; + }; + url: '/v1/courses/{course_id}/usage_rights'; +}; + +export type RemoveUsageRightsCoursesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SetUsageRightsCoursesData = { + body: { + /** + * List of ids of files to set usage rights for. + */ + file_ids: Array; + /** + * List of ids of folders to search for files to set usage rights for. + * Note that new files uploaded to these folders do not automatically inherit these rights. + */ + folder_ids?: Array; + /** + * Whether the file(s) or folder(s) should be published on save, provided that usage rights have been specified (set to `true` to publish on save). + */ + publish?: boolean; + /** + * The legal copyright line for the files + */ + 'usage_rights[legal_copyright]'?: string; + /** + * The license that applies to the files. See the {api:UsageRightsController#licenses List licenses endpoint} for the supported license types. + */ + 'usage_rights[license]'?: string; + /** + * The intellectual property justification for using the files in Canvas + */ + 'usage_rights[use_justification]': 'own_copyright' | 'used_by_permission' | 'fair_use' | 'public_domain' | 'creative_commons'; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/usage_rights'; +}; + +export type SetUsageRightsCoursesResponses = { + /** + * No response was specified + */ + 200: UsageRights; +}; + +export type SetUsageRightsCoursesResponse = SetUsageRightsCoursesResponses[keyof SetUsageRightsCoursesResponses]; + +export type ListUsersInCourseUsersData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: number; + /** + * The numbers of items to return. + */ + per_page?: number; + /** + * The partial name or full ID of the users to match and return in the results list. + */ + search_term?: string; + /** + * When set, only return users where the user is enrolled as this type. + * "student_view" implies include[]=test_student. + * This argument is ignored if enrollment_role is given. + */ + 'enrollment_type[]'?: Array<'teacher' | 'student' | 'student_view' | 'ta' | 'observer' | 'designer'>; + /** + * Deprecated + * When set, only return users enrolled with the specified course-level role. This can be + * a role created with the {api:RoleOverridesController#add_role Add Role API} or a + * base role type of 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', + * 'ObserverEnrollment', or 'DesignerEnrollment'. + */ + enrollment_role?: string; + /** + * When set, only return courses where the user is enrolled with the specified + * course-level role. This can be a role created with the + * {api:RoleOverridesController#add_role Add Role API} or a built_in role id with type + * 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'ObserverEnrollment', + * or 'DesignerEnrollment'. + */ + enrollment_role_id?: number; + /** + * - "enrollments": + * Optionally include with each Course the user's current and invited + * enrollments. If the user is enrolled as a student, and the account has + * permission to manage or view all grades, each enrollment will include a + * 'grades' key with 'current_score', 'final_score', 'current_grade' and + * 'final_grade' values. + * - "locked": Optionally include whether an enrollment is locked. + * - "avatar_url": Optionally include avatar_url. + * - "bio": Optionally include each user's bio. + * - "test_student": Optionally include the course's Test Student, + * if present. Default is to not include Test Student. + * - "custom_links": Optionally include plugin-supplied custom links for each student, + * such as analytics information + * - "current_grading_period_scores": if enrollments is included as + * well as this directive, the scores returned in the enrollment + * will be for the current grading period if there is one. A + * 'grading_period_id' value will also be included with the + * scores. if grading_period_id is nil there is no current grading + * period and the score is a total score. + */ + 'include[]'?: Array<'email' | 'enrollments' | 'locked' | 'avatar_url' | 'test_student' | 'bio' | 'custom_links' | 'current_grading_period_scores' | 'sections'>; + /** + * If this parameter is given and it corresponds to a user in the course, + * the +page+ parameter will be ignored and the page containing the specified user + * will be returned instead. + */ + user_id?: string; + /** + * If included, the course users set will only include users with IDs + * specified by the param. Note: this will not work in conjunction + * with the "user_id" argument but multiple user_ids can be included. + */ + 'user_ids[]'?: Array; + /** + * When set, only return users where the enrollment workflow state is of one of the given types. + * "active" and "invited" enrollments are returned by default. + */ + 'enrollment_state[]'?: Array<'active' | 'invited' | 'rejected' | 'completed' | 'inactive'>; + }; + url: '/v1/courses/{course_id}/users'; +}; + +export type ListUsersInCourseUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListUsersInCourseUsersResponse = ListUsersInCourseUsersResponses[keyof ListUsersInCourseUsersResponses]; + +export type GetSingleUserData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/users/{id}'; +}; + +export type GetSingleUserResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type GetSingleUserResponse = GetSingleUserResponses[keyof GetSingleUserResponses]; + +export type AddsLastAttendedDateToStudentEnrollmentInCourseData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/courses/{course_id}/users/{user_id}/last_attended'; +}; + +export type AddsLastAttendedDateToStudentEnrollmentInCourseResponses = { + /** + * No response was specified + */ + 200: Enrollment; +}; + +export type AddsLastAttendedDateToStudentEnrollmentInCourseResponse = AddsLastAttendedDateToStudentEnrollmentInCourseResponses[keyof AddsLastAttendedDateToStudentEnrollmentInCourseResponses]; + +export type DeleteConcludeCourseData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query: { + /** + * The action to take on the course. + */ + event: 'delete' | 'conclude'; + }; + url: '/v1/courses/{id}'; +}; + +export type DeleteConcludeCourseResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleCourseCoursesData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * - "all_courses": Also search recently deleted courses. + * - "permissions": Include permissions the current user has + * for the course. + * - "observed_users": include observed users in the enrollments + * - "course_image": Optional course image data for when there is a course image + * and the course image feature flag has been enabled + */ + include?: 'needs_grading_count' | 'syllabus_body' | 'public_description' | 'total_scores' | 'current_grading_period_scores' | 'term' | 'account' | 'course_progress' | 'sections' | 'storage_quota_used_mb' | 'total_students' | 'passback_status' | 'favorites' | 'teachers' | 'observed_users' | 'all_courses' | 'permissions' | 'course_image'; + }; + url: '/v1/courses/{id}'; +}; + +export type GetSingleCourseCoursesResponses = { + /** + * No response was specified + */ + 200: Course; +}; + +export type GetSingleCourseCoursesResponse = GetSingleCourseCoursesResponses[keyof GetSingleCourseCoursesResponses]; + +export type UpdateCourseData = { + body?: { + /** + * The unique ID of the account to move the course to. + */ + 'course[account_id]'?: number; + /** + * If true, students can attach files to forum posts. + */ + 'course[allow_student_forum_attachments]'?: boolean; + /** + * If true, students will be able to modify the course wiki. + */ + 'course[allow_student_wiki_edits]'?: boolean; + /** + * If true, course members will be able to comment on wiki pages. + */ + 'course[allow_wiki_comments]'?: boolean; + /** + * Set to true to weight final grade based on assignment groups percentages. + */ + 'course[apply_assignment_group_weights]'?: boolean; + /** + * Sets the course as a blueprint course. NOTE: The Blueprint Courses feature is in beta + */ + 'course[blueprint]'?: boolean; + /** + * Sets a default set to apply to blueprint course objects when restricted, + * unless _use_blueprint_restrictions_by_object_type_ is enabled. + * See the {api:Blueprint_Courses:BlueprintRestriction Blueprint Restriction} documentation + */ + 'course[blueprint_restrictions]'?: unknown; + /** + * Allows setting multiple {api:Blueprint_Courses:BlueprintRestriction Blueprint Restriction} + * to apply to blueprint course objects of the matching type when restricted. + * The possible object types are "assignment", "attachment", "discussion_topic", "quiz" and "wiki_page". + * Example usage: + * course[blueprint_restrictions_by_object_type][assignment][content]=1 + */ + 'course[blueprint_restrictions_by_object_type]'?: unknown; + /** + * The course code for the course. + */ + 'course[course_code]'?: string; + /** + * Optional. Specifies the format of the course. (Should be either 'on_campus' or 'online') + */ + 'course[course_format]'?: string; + /** + * The type of page that users will see when they first visit the course + * * 'feed' Recent Activity Dashboard + * * 'wiki' Wiki Front Page + * * 'modules' Course Modules/Sections Page + * * 'assignments' Course Assignments List + * * 'syllabus' Course Syllabus Page + * other types may be added in the future + */ + 'course[default_view]'?: 'feed' | 'wiki' | 'modules' | 'syllabus' | 'assignments'; + /** + * Course end date in ISO8601 format. e.g. 2011-01-01T01:00Z + */ + 'course[end_at]'?: string; + /** + * The action to take on each course. + * * 'claim' makes a course no longer visible to students. This action is also called "unpublish" on the web site. + * A course cannot be unpublished if students have received graded submissions. + * * 'offer' makes a course visible to students. This action is also called "publish" on the web site. + * * 'conclude' prevents future enrollments and makes a course read-only for all participants. The course still appears + * in prior-enrollment lists. + * * 'delete' completely removes the course from the web site (including course menus and prior-enrollment lists). + * All enrollments are deleted. Course content may be physically deleted at a future date. + * * 'undelete' attempts to recover a course that has been deleted. (Recovery is not guaranteed; please conclude + * rather than delete a course if there is any possibility the course will be used again.) The recovered course + * will be unpublished. Deleted enrollments will not be recovered. + */ + 'course[event]'?: 'claim' | 'offer' | 'conclude' | 'delete' | 'undelete'; + /** + * The grading standard id to set for the course. If no value is provided for this argument the current grading_standard will be un-set from this course. + */ + 'course[grading_standard_id]'?: number; + /** + * If this option is set to true, the totals in student grades summary will + * be hidden. + */ + 'course[hide_final_grades]'?: boolean; + /** + * This is a file ID corresponding to an image file in the course that will + * be used as the course image. + * This will clear the course's image_url setting if set. If you attempt + * to provide image_url and image_id in a request it will fail. + */ + 'course[image_id]'?: number; + /** + * This is a URL to an image to be used as the course image. + * This will clear the course's image_id setting if set. If you attempt + * to provide image_url and image_id in a request it will fail. + */ + 'course[image_url]'?: string; + /** + * The unique Integration identifier. + */ + 'course[integration_id]'?: string; + /** + * Set to true if course is public to both authenticated and unauthenticated users. + */ + 'course[is_public]'?: boolean; + /** + * Set to true if course is public only to authenticated users. + */ + 'course[is_public_to_auth_users]'?: boolean; + /** + * The name of the licensing. Should be one of the following abbreviations + * (a descriptive name is included in parenthesis for reference): + * - 'private' (Private Copyrighted) + * - 'cc_by_nc_nd' (CC Attribution Non-Commercial No Derivatives) + * - 'cc_by_nc_sa' (CC Attribution Non-Commercial Share Alike) + * - 'cc_by_nc' (CC Attribution Non-Commercial) + * - 'cc_by_nd' (CC Attribution No Derivatives) + * - 'cc_by_sa' (CC Attribution Share Alike) + * - 'cc_by' (CC Attribution) + * - 'public_domain' (Public Domain). + */ + 'course[license]'?: string; + /** + * The name of the course. If omitted, the course will be named "Unnamed + * Course." + */ + 'course[name]'?: string; + /** + * Set to true if the course is open enrollment. + */ + 'course[open_enrollment]'?: boolean; + /** + * A publicly visible description of the course. + */ + 'course[public_description]'?: string; + /** + * Set to true to make the course syllabus public. + */ + 'course[public_syllabus]'?: boolean; + /** + * Set to true to make the course syllabus to public for authenticated users. + */ + 'course[public_syllabus_to_auth]'?: boolean; + /** + * If this option is set to true, the course image url and course image + * ID are both set to nil + */ + 'course[remove_image]'?: boolean; + /** + * Set to true to restrict user enrollments to the start and end dates of the + * course. + */ + 'course[restrict_enrollments_to_course_dates]'?: boolean; + /** + * Set to true if the course is self enrollment. + */ + 'course[self_enrollment]'?: boolean; + /** + * The unique SIS identifier. + */ + 'course[sis_course_id]'?: string; + /** + * Course start date in ISO8601 format, e.g. 2011-01-01T01:00Z + */ + 'course[start_at]'?: string; + /** + * Set the storage quota for the course, in megabytes. The caller must have + * the "Manage storage quotas" account permission. + */ + 'course[storage_quota_mb]'?: number; + /** + * The syllabus body for the course + */ + 'course[syllabus_body]'?: string; + /** + * The unique ID of the term to create to course in. + */ + 'course[term_id]'?: number; + /** + * The time zone for the course. Allowed time zones are + * {http://www.iana.org/time-zones IANA time zones} or friendlier + * {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. + */ + 'course[time_zone]'?: string; + /** + * When enabled, the _blueprint_restrictions_ parameter will be ignored in favor of + * the _blueprint_restrictions_by_object_type_ parameter + */ + 'course[use_blueprint_restrictions_by_object_type]'?: boolean; + /** + * If this option is set to true, the course will be available to students + * immediately. + */ + offer?: boolean; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{id}'; +}; + +export type UpdateCourseResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetLatePolicyData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{id}/late_policy'; +}; + +export type GetLatePolicyResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type PatchLatePolicyData = { + body?: { + /** + * How many percentage points to deduct per the late submission interval. + */ + 'late_policy[late_submission_deduction]'?: number; + /** + * Whether to enable the late submission deduction late policy. + */ + 'late_policy[late_submission_deduction_enabled]'?: boolean; + /** + * The interval for late policies. + */ + 'late_policy[late_submission_interval]'?: string; + /** + * The minimum grade a submissions can have in percentage points. + */ + 'late_policy[late_submission_minimum_percent]'?: number; + /** + * Whether to enable the late submission minimum percent for a late policy. + */ + 'late_policy[late_submission_minimum_percent_enabled]'?: boolean; + /** + * How many percentage points to deduct from a missing submission. + */ + 'late_policy[missing_submission_deduction]'?: number; + /** + * Whether to enable the missing submission deduction late policy. + */ + 'late_policy[missing_submission_deduction_enabled]'?: boolean; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{id}/late_policy'; +}; + +export type PatchLatePolicyResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateLatePolicyData = { + body?: { + /** + * How many percentage points to deduct per the late submission interval. + */ + 'late_policy[late_submission_deduction]'?: number; + /** + * Whether to enable the late submission deduction late policy. + */ + 'late_policy[late_submission_deduction_enabled]'?: boolean; + /** + * The interval for late policies. + */ + 'late_policy[late_submission_interval]'?: string; + /** + * The minimum grade a submissions can have in percentage points. + */ + 'late_policy[late_submission_minimum_percent]'?: number; + /** + * Whether to enable the late submission minimum percent for a late policy. + */ + 'late_policy[late_submission_minimum_percent_enabled]'?: boolean; + /** + * How many percentage points to deduct from a missing submission. + */ + 'late_policy[missing_submission_deduction]'?: number; + /** + * Whether to enable the missing submission deduction late policy. + */ + 'late_policy[missing_submission_deduction_enabled]'?: boolean; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/courses/{id}/late_policy'; +}; + +export type CreateLatePolicyResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListCoursesWithTheirLatestEpubExportData = { + body?: never; + path?: never; + query?: never; + url: '/v1/epub_exports'; +}; + +export type ListCoursesWithTheirLatestEpubExportResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListCoursesWithTheirLatestEpubExportResponse = ListCoursesWithTheirLatestEpubExportResponses[keyof ListCoursesWithTheirLatestEpubExportResponses]; + +export type CreateErrorReportData = { + body: { + /** + * The long version of the story from the user one what they experienced + */ + 'error[comments]'?: string; + /** + * Email address for the reporting user + */ + 'error[email]'?: string; + /** + * A collection of metadata about the users' environment. If not provided, + * canvas will collect it based on information found in the request. + * (Doesn't have to be HTTPENV info, could be anything JSON object that can be + * serialized as a hash, a mobile app might include relevant metadata for + * itself) + */ + 'error[http_env]'?: unknown; + /** + * The summary of the problem + */ + 'error[subject]': string; + /** + * URL from which the report was issued + */ + 'error[url]'?: string; + }; + path?: never; + query?: never; + url: '/v1/error_reports'; +}; + +export type CreateErrorReportResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteFileData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * This action is irreversible. + * If replace is set to true the file contents will be replaced with a + * generic "file has been removed" file. This also destroys any previews + * that have been generated for the file. + * Must have manage files and become other users permissions + */ + replace?: boolean; + }; + url: '/v1/files/{id}'; +}; + +export type DeleteFileResponses = { + /** + * No response was specified + */ + 200: File; +}; + +export type DeleteFileResponse = DeleteFileResponses[keyof DeleteFileResponses]; + +export type GetFileFilesData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * Array of additional information to include. + * + * "user":: the user who uploaded the file or last edited its content + * "usage_rights":: copyright and license information for the file (see UsageRights) + */ + include?: 'user'; + }; + url: '/v1/files/{id}'; +}; + +export type GetFileFilesResponses = { + /** + * No response was specified + */ + 200: File; +}; + +export type GetFileFilesResponse = GetFileFilesResponses[keyof GetFileFilesResponses]; + +export type UpdateFileData = { + body?: { + /** + * Flag the file as hidden + */ + hidden?: boolean; + /** + * The datetime to lock the file at + */ + lock_at?: string; + /** + * Flag the file as locked + */ + locked?: boolean; + /** + * The new display name of the file + */ + name?: string; + /** + * If the file is moved to a folder containing a file with the same name, + * or renamed to a name matching an existing file, the API call will fail + * unless this parameter is supplied. + * + * "overwrite":: Replace the existing file with the same name + * "rename":: Add a qualifier to make the new filename unique + */ + on_duplicate?: 'overwrite' | 'rename'; + /** + * The id of the folder to move this file into. + * The new folder must be in the same context as the original parent folder. + * If the file is in a context without folders this does not apply. + */ + parent_folder_id?: string; + /** + * The datetime to unlock the file at + */ + unlock_at?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/files/{id}'; +}; + +export type UpdateFileResponses = { + /** + * No response was specified + */ + 200: File; +}; + +export type UpdateFileResponse = UpdateFileResponses[keyof UpdateFileResponses]; + +export type GetPublicInlinePreviewUrlData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * The id of the submission the file is associated with. Provide this argument to gain access to a file + * that has been submitted to an assignment (Canvas will verify that the file belongs to the submission + * and the calling user has rights to view the submission). + */ + submission_id?: number; + }; + url: '/v1/files/{id}/public_url'; +}; + +export type GetPublicInlinePreviewUrlResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CopyFileData = { + body: { + /** + * What to do if a file with the same name already exists at the destination. + * If such a file exists and this parameter is not given, the call will fail. + * + * "overwrite":: Replace an existing file with the same name + * "rename":: Add a qualifier to make the new filename unique + */ + on_duplicate?: 'overwrite' | 'rename'; + /** + * The id of the source file + */ + source_file_id: string; + }; + path: { + /** + * ID + */ + dest_folder_id: string; + }; + query?: never; + url: '/v1/folders/{dest_folder_id}/copy_file'; +}; + +export type CopyFileResponses = { + /** + * No response was specified + */ + 200: File; +}; + +export type CopyFileResponse = CopyFileResponses[keyof CopyFileResponses]; + +export type CopyFolderData = { + body: { + /** + * The id of the source folder + */ + source_folder_id: string; + }; + path: { + /** + * ID + */ + dest_folder_id: string; + }; + query?: never; + url: '/v1/folders/{dest_folder_id}/copy_folder'; +}; + +export type CopyFolderResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type CopyFolderResponse = CopyFolderResponses[keyof CopyFolderResponses]; + +export type UploadFileToFolderData = { + body?: never; + path: { + /** + * ID + */ + folder_id: string; + }; + query?: never; + url: '/v1/folders/{folder_id}/files'; +}; + +export type UploadFileToFolderResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateFolderFoldersData = { + body: { + /** + * Flag the folder as hidden + */ + hidden?: boolean; + /** + * The datetime to lock the folder at + */ + lock_at?: string; + /** + * Flag the folder as locked + */ + locked?: boolean; + /** + * The name of the folder + */ + name: string; + /** + * The id of the folder to store the file in. If this and parent_folder_path are sent an error will be returned. If neither is given, a default folder will be used. + */ + parent_folder_id?: string; + /** + * The path of the folder to store the new folder in. The path separator is the forward slash `/`, never a back slash. The parent folder will be created if it does not already exist. This parameter only applies to new folders in a context that has folders, such as a user, a course, or a group. If this and parent_folder_id are sent an error will be returned. If neither is given, a default folder will be used. + */ + parent_folder_path?: string; + /** + * Set an explicit sort position for the folder + */ + position?: number; + /** + * The datetime to unlock the folder at + */ + unlock_at?: string; + }; + path: { + /** + * ID + */ + folder_id: string; + }; + query?: never; + url: '/v1/folders/{folder_id}/folders'; +}; + +export type CreateFolderFoldersResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type CreateFolderFoldersResponse = CreateFolderFoldersResponses[keyof CreateFolderFoldersResponses]; + +export type DeleteFolderData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * Set to 'true' to allow deleting a non-empty folder + */ + force?: boolean; + }; + url: '/v1/folders/{id}'; +}; + +export type DeleteFolderResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetFolderFoldersData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/folders/{id}'; +}; + +export type GetFolderFoldersResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type GetFolderFoldersResponse = GetFolderFoldersResponses[keyof GetFolderFoldersResponses]; + +export type UpdateFolderData = { + body?: { + /** + * Flag the folder as hidden + */ + hidden?: boolean; + /** + * The datetime to lock the folder at + */ + lock_at?: string; + /** + * Flag the folder as locked + */ + locked?: boolean; + /** + * The new name of the folder + */ + name?: string; + /** + * The id of the folder to move this folder into. The new folder must be in the same context as the original parent folder. + */ + parent_folder_id?: string; + /** + * Set an explicit sort position for the folder + */ + position?: number; + /** + * The datetime to unlock the folder at + */ + unlock_at?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/folders/{id}'; +}; + +export type UpdateFolderResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type UpdateFolderResponse = UpdateFolderResponses[keyof UpdateFolderResponses]; + +export type ListFilesFoldersData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * Filter results by content-type. You can specify type/subtype pairs (e.g., + * 'image/jpeg'), or simply types (e.g., 'image', which will match + * 'image/gif', 'image/jpeg', etc.). + */ + content_types?: Array; + /** + * The partial name of the files to match and return. + */ + search_term?: string; + /** + * Array of additional information to include. + * + * "user":: the user who uploaded the file or last edited its content + * "usage_rights":: copyright and license information for the file (see UsageRights) + */ + include?: 'user'; + /** + * Array of information to restrict to. Overrides include[] + * + * "names":: only returns file name information + */ + only?: Array>; + /** + * Sort results by this field. Defaults to 'name'. Note that `sort=user` implies `include[]=user`. + */ + sort?: 'name' | 'size' | 'created_at' | 'updated_at' | 'content_type' | 'user'; + /** + * The sorting order. Defaults to 'asc'. + */ + order?: 'asc' | 'desc'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/folders/{id}/files'; +}; + +export type ListFilesFoldersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListFilesFoldersResponse = ListFilesFoldersResponses[keyof ListFilesFoldersResponses]; + +export type ListFoldersData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/folders/{id}/folders'; +}; + +export type ListFoldersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListFoldersResponse = ListFoldersResponses[keyof ListFoldersResponses]; + +export type DeleteOutcomeGroupGlobalData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/global/outcome_groups/{id}'; +}; + +export type DeleteOutcomeGroupGlobalResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type DeleteOutcomeGroupGlobalResponse = DeleteOutcomeGroupGlobalResponses[keyof DeleteOutcomeGroupGlobalResponses]; + +export type ShowOutcomeGroupGlobalData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/global/outcome_groups/{id}'; +}; + +export type ShowOutcomeGroupGlobalResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type ShowOutcomeGroupGlobalResponse = ShowOutcomeGroupGlobalResponses[keyof ShowOutcomeGroupGlobalResponses]; + +export type UpdateOutcomeGroupGlobalData = { + body?: { + /** + * The new outcome group description. + */ + description?: string; + /** + * The id of the new parent outcome group. + */ + parent_outcome_group_id?: number; + /** + * The new outcome group title. + */ + title?: string; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/global/outcome_groups/{id}'; +}; + +export type UpdateOutcomeGroupGlobalResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type UpdateOutcomeGroupGlobalResponse = UpdateOutcomeGroupGlobalResponses[keyof UpdateOutcomeGroupGlobalResponses]; + +export type ImportOutcomeGroupGlobalData = { + body: { + /** + * If true, perform action asynchronously. In that case, this endpoint + * will return a Progress object instead of an OutcomeGroup. + * Use the {api:ProgressController#show progress endpoint} + * to query the status of the operation. The imported outcome group id + * and url will be returned in the results of the Progress object + * as "outcome_group_id" and "outcome_group_url" + */ + async?: boolean; + /** + * The ID of the source outcome group. + */ + source_outcome_group_id: number; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/global/outcome_groups/{id}/import'; +}; + +export type ImportOutcomeGroupGlobalResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type ImportOutcomeGroupGlobalResponse = ImportOutcomeGroupGlobalResponses[keyof ImportOutcomeGroupGlobalResponses]; + +export type ListLinkedOutcomesGlobalData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * The detail level of the outcomes. Defaults to "abbrev". + * Specify "full" for more information. + */ + outcome_style?: string; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/global/outcome_groups/{id}/outcomes'; +}; + +export type ListLinkedOutcomesGlobalResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListLinkedOutcomesGlobalResponse = ListLinkedOutcomesGlobalResponses[keyof ListLinkedOutcomesGlobalResponses]; + +export type CreateLinkOutcomeGlobalData = { + body?: { + /** + * The new calculation int. Only applies if the calculation_method is "decaying_average" or "n_mastery" + */ + calculation_int?: number; + /** + * The new calculation method. Defaults to "highest" + */ + calculation_method?: 'decaying_average' | 'n_mastery' | 'latest' | 'highest'; + /** + * The description of the new outcome. + */ + description?: string; + /** + * A friendly name shown in reports for outcomes with cryptic titles, + * such as common core standards names. + */ + display_name?: string; + /** + * The mastery threshold for the embedded rubric criterion. + */ + mastery_points?: number; + /** + * The ID of the old outcome group. Only used if outcome_id is present. + */ + move_from?: number; + /** + * The ID of the existing outcome to link. + */ + outcome_id?: number; + /** + * The description of a rating level for the embedded rubric criterion. + */ + 'ratings[description]'?: Array; + /** + * The points corresponding to a rating level for the embedded rubric criterion. + */ + 'ratings[points]'?: Array; + /** + * The title of the new outcome. Required if outcome_id is absent. + */ + title?: string; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/global/outcome_groups/{id}/outcomes'; +}; + +export type CreateLinkOutcomeGlobalResponses = { + /** + * No response was specified + */ + 200: OutcomeLink; +}; + +export type CreateLinkOutcomeGlobalResponse = CreateLinkOutcomeGlobalResponses[keyof CreateLinkOutcomeGlobalResponses]; + +export type UnlinkOutcomeGlobalData = { + body?: never; + path: { + /** + * ID + */ + id: string; + /** + * ID + */ + outcome_id: string; + }; + query?: never; + url: '/v1/global/outcome_groups/{id}/outcomes/{outcome_id}'; +}; + +export type UnlinkOutcomeGlobalResponses = { + /** + * No response was specified + */ + 200: OutcomeLink; +}; + +export type UnlinkOutcomeGlobalResponse = UnlinkOutcomeGlobalResponses[keyof UnlinkOutcomeGlobalResponses]; + +export type CreateLinkOutcomeGlobalOutcomeIdData = { + body?: { + /** + * The new calculation int. Only applies if the calculation_method is "decaying_average" or "n_mastery" + */ + calculation_int?: number; + /** + * The new calculation method. Defaults to "highest" + */ + calculation_method?: 'decaying_average' | 'n_mastery' | 'latest' | 'highest'; + /** + * The description of the new outcome. + */ + description?: string; + /** + * A friendly name shown in reports for outcomes with cryptic titles, + * such as common core standards names. + */ + display_name?: string; + /** + * The mastery threshold for the embedded rubric criterion. + */ + mastery_points?: number; + /** + * The ID of the old outcome group. Only used if outcome_id is present. + */ + move_from?: number; + /** + * The description of a rating level for the embedded rubric criterion. + */ + 'ratings[description]'?: Array; + /** + * The points corresponding to a rating level for the embedded rubric criterion. + */ + 'ratings[points]'?: Array; + /** + * The title of the new outcome. Required if outcome_id is absent. + */ + title?: string; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + id: string; + /** + * The ID of the existing outcome to link. + */ + outcome_id: number; + }; + query?: never; + url: '/v1/global/outcome_groups/{id}/outcomes/{outcome_id}'; +}; + +export type CreateLinkOutcomeGlobalOutcomeIdResponses = { + /** + * No response was specified + */ + 200: OutcomeLink; +}; + +export type CreateLinkOutcomeGlobalOutcomeIdResponse = CreateLinkOutcomeGlobalOutcomeIdResponses[keyof CreateLinkOutcomeGlobalOutcomeIdResponses]; + +export type ListSubgroupsGlobalData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/global/outcome_groups/{id}/subgroups'; +}; + +export type ListSubgroupsGlobalResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListSubgroupsGlobalResponse = ListSubgroupsGlobalResponses[keyof ListSubgroupsGlobalResponses]; + +export type CreateSubgroupGlobalData = { + body: { + /** + * The description of the new outcome group. + */ + description?: string; + /** + * The title of the new outcome group. + */ + title: string; + /** + * A custom GUID for the learning standard + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/global/outcome_groups/{id}/subgroups'; +}; + +export type CreateSubgroupGlobalResponses = { + /** + * No response was specified + */ + 200: OutcomeGroup; +}; + +export type CreateSubgroupGlobalResponse = CreateSubgroupGlobalResponses[keyof CreateSubgroupGlobalResponses]; + +export type RedirectToRootOutcomeGroupForContextGlobalData = { + body?: never; + path?: never; + query?: never; + url: '/v1/global/root_outcome_group'; +}; + +export type RedirectToRootOutcomeGroupForContextGlobalResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteGroupCategoryData = { + body?: never; + path: { + /** + * ID + */ + group_category_id: string; + }; + query?: never; + url: '/v1/group_categories/{group_category_id}'; +}; + +export type DeleteGroupCategoryResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleGroupCategoryData = { + body?: never; + path: { + /** + * ID + */ + group_category_id: string; + }; + query?: never; + url: '/v1/group_categories/{group_category_id}'; +}; + +export type GetSingleGroupCategoryResponses = { + /** + * No response was specified + */ + 200: GroupCategory; +}; + +export type GetSingleGroupCategoryResponse = GetSingleGroupCategoryResponses[keyof GetSingleGroupCategoryResponses]; + +export type UpdateGroupCategoryData = { + body?: { + /** + * Assigns group leaders automatically when generating and allocating students to groups + * Valid values are: + * "first":: the first student to be allocated to a group is the leader + * "random":: a random student from all members is chosen as the leader + */ + auto_leader?: 'first' | 'random'; + /** + * Create this number of groups (Course Only). + */ + create_group_count?: number; + /** + * Limit the maximum number of users in each group (Course Only). Requires + * self signup. + */ + group_limit?: number; + /** + * Name of the group category + */ + name?: string; + /** + * Allow students to sign up for a group themselves (Course Only). + * Valid values are: + * "enabled":: allows students to self sign up for any group in course + * "restricted":: allows students to self sign up only for groups in the + * same section null disallows self sign up + */ + self_signup?: 'enabled' | 'restricted'; + /** + * The unique SIS identifier. + */ + sis_group_category_id?: string; + /** + * (Deprecated) + * Create this number of groups, and evenly distribute students + * among them. not allowed with "enable_self_signup". because + * the group assignment happens synchronously, it's recommended + * that you instead use the assign_unassigned_members endpoint. + * (Course Only) + */ + split_group_count?: string; + }; + path: { + /** + * ID + */ + group_category_id: string; + }; + query?: never; + url: '/v1/group_categories/{group_category_id}'; +}; + +export type UpdateGroupCategoryResponses = { + /** + * No response was specified + */ + 200: GroupCategory; +}; + +export type UpdateGroupCategoryResponse = UpdateGroupCategoryResponses[keyof UpdateGroupCategoryResponses]; + +export type AssignUnassignedMembersData = { + body?: { + /** + * The assigning is done asynchronously by default. If you would like to + * override this and have the assigning done synchronously, set this value + * to true. + */ + sync?: boolean; + }; + path: { + /** + * ID + */ + group_category_id: string; + }; + query?: never; + url: '/v1/group_categories/{group_category_id}/assign_unassigned_members'; +}; + +export type AssignUnassignedMembersResponses = { + /** + * No response was specified + */ + 200: GroupMembership; +}; + +export type AssignUnassignedMembersResponse = AssignUnassignedMembersResponses[keyof AssignUnassignedMembersResponses]; + +export type CreateGroupGroupCategoriesData = { + body?: { + /** + * A description of the group + */ + description?: string; + /** + * whether the group is public (applies only to community groups) + */ + is_public?: boolean; + /** + * no description + */ + join_level?: 'parent_context_auto_join' | 'parent_context_request' | 'invitation_only'; + /** + * The name of the group + */ + name?: string; + /** + * The sis ID of the group. Must have manage_sis permission to set. + */ + sis_group_id?: string; + /** + * The allowed file storage for the group, in megabytes. This parameter is + * ignored if the caller does not have the manage_storage_quotas permission. + */ + storage_quota_mb?: number; + }; + path: { + /** + * ID + */ + group_category_id: string; + }; + query?: never; + url: '/v1/group_categories/{group_category_id}/groups'; +}; + +export type CreateGroupGroupCategoriesResponses = { + /** + * No response was specified + */ + 200: Group; +}; + +export type CreateGroupGroupCategoriesResponse = CreateGroupGroupCategoriesResponses[keyof CreateGroupGroupCategoriesResponses]; + +export type ListUsersInGroupCategoryData = { + body?: never; + path: { + /** + * ID + */ + group_category_id: string; + }; + query?: { + /** + * The partial name or full ID of the users to match and return in the results + * list. Must be at least 3 characters. + */ + search_term?: string; + /** + * Set this value to true if you wish only to search unassigned users in the + * group category. + */ + unassigned?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/group_categories/{group_category_id}/users'; +}; + +export type ListUsersInGroupCategoryResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListUsersInGroupCategoryResponse = ListUsersInGroupCategoryResponses[keyof ListUsersInGroupCategoryResponses]; + +export type CreateGroupGroupsData = { + body?: { + /** + * A description of the group + */ + description?: string; + /** + * whether the group is public (applies only to community groups) + */ + is_public?: boolean; + /** + * no description + */ + join_level?: 'parent_context_auto_join' | 'parent_context_request' | 'invitation_only'; + /** + * The name of the group + */ + name?: string; + /** + * The sis ID of the group. Must have manage_sis permission to set. + */ + sis_group_id?: string; + /** + * The allowed file storage for the group, in megabytes. This parameter is + * ignored if the caller does not have the manage_storage_quotas permission. + */ + storage_quota_mb?: number; + }; + path?: never; + query?: never; + url: '/v1/groups'; +}; + +export type CreateGroupGroupsResponses = { + /** + * No response was specified + */ + 200: Group; +}; + +export type CreateGroupGroupsResponse = CreateGroupGroupsResponses[keyof CreateGroupGroupsResponses]; + +export type DeleteGroupData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}'; +}; + +export type DeleteGroupResponses = { + /** + * No response was specified + */ + 200: Group; +}; + +export type DeleteGroupResponse = DeleteGroupResponses[keyof DeleteGroupResponses]; + +export type GetSingleGroupData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * - "permissions": Include permissions the current user has + * for the group. + * - "tabs": Include the list of tabs configured for each group. See the + * {api:TabsController#index List available tabs API} for more information. + */ + include?: 'permissions' | 'tabs'; + }; + url: '/v1/groups/{group_id}'; +}; + +export type GetSingleGroupResponses = { + /** + * No response was specified + */ + 200: Group; +}; + +export type GetSingleGroupResponse = GetSingleGroupResponses[keyof GetSingleGroupResponses]; + +export type EditGroupData = { + body?: { + /** + * The id of the attachment previously uploaded to the group that you would + * like to use as the avatar image for this group. + */ + avatar_id?: number; + /** + * A description of the group + */ + description?: string; + /** + * Whether the group is public (applies only to community groups). Currently + * you cannot set a group back to private once it has been made public. + */ + is_public?: boolean; + /** + * no description + */ + join_level?: 'parent_context_auto_join' | 'parent_context_request' | 'invitation_only'; + /** + * An array of user ids for users you would like in the group. + * Users not in the group will be sent invitations. Existing group + * members who aren't in the list will be removed from the group. + */ + members?: Array; + /** + * The name of the group + */ + name?: string; + /** + * The sis ID of the group. Must have manage_sis permission to set. + */ + sis_group_id?: string; + /** + * The allowed file storage for the group, in megabytes. This parameter is + * ignored if the caller does not have the manage_storage_quotas permission. + */ + storage_quota_mb?: number; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}'; +}; + +export type EditGroupResponses = { + /** + * No response was specified + */ + 200: Group; +}; + +export type EditGroupResponse = EditGroupResponses[keyof EditGroupResponses]; + +export type GroupActivityStreamData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/activity_stream'; +}; + +export type GroupActivityStreamResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GroupActivityStreamSummaryData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/activity_stream/summary'; +}; + +export type GroupActivityStreamSummaryResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RedirectToAssignmentOverrideForGroupData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/assignments/{assignment_id}/override'; +}; + +export type RedirectToAssignmentOverrideForGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListCollaborationsGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/collaborations'; +}; + +export type ListCollaborationsGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListCollaborationsGroupsResponse = ListCollaborationsGroupsResponses[keyof ListCollaborationsGroupsResponses]; + +export type ListConferencesGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/conferences'; +}; + +export type ListConferencesGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListConferencesGroupsResponse = ListConferencesGroupsResponses[keyof ListConferencesGroupsResponses]; + +export type ListContentExportsGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/content_exports'; +}; + +export type ListContentExportsGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListContentExportsGroupsResponse = ListContentExportsGroupsResponses[keyof ListContentExportsGroupsResponses]; + +export type ExportContentGroupsData = { + body: { + /** + * "common_cartridge":: Export the contents of the course in the Common Cartridge (.imscc) format + * "qti":: Export quizzes from a course in the QTI format + * "zip":: Export files from a course, group, or user in a zip file + */ + export_type: 'common_cartridge' | 'qti' | 'zip'; + /** + * The select parameter allows exporting specific data. The keys are object types like 'files', + * 'folders', 'pages', etc. The value for each key is a list of object ids. An id can be an + * integer or a string. + * + * Multiple object types can be selected in the same call. However, not all object types are + * valid for every export_type. Common Cartridge supports all object types. Zip and QTI only + * support the object types as described below. + * + * "folders":: Also supported for zip export_type. + * "files":: Also supported for zip export_type. + * "quizzes":: Also supported for qti export_type. + */ + select?: 'folders' | 'files' | 'attachments' | 'quizzes' | 'assignments' | 'announcements' | 'calendar_events' | 'discussion_topics' | 'modules' | 'module_items' | 'pages' | 'rubrics'; + /** + * Don't send the notifications about the export to the user. Default: false + */ + skip_notifications?: boolean; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/content_exports'; +}; + +export type ExportContentGroupsResponses = { + /** + * No response was specified + */ + 200: ContentExport; +}; + +export type ExportContentGroupsResponse = ExportContentGroupsResponses[keyof ExportContentGroupsResponses]; + +export type ShowContentExportGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/content_exports/{id}'; +}; + +export type ShowContentExportGroupsResponses = { + /** + * No response was specified + */ + 200: ContentExport; +}; + +export type ShowContentExportGroupsResponse = ShowContentExportGroupsResponses[keyof ShowContentExportGroupsResponses]; + +export type ListLicensesGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/content_licenses'; +}; + +export type ListLicensesGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListLicensesGroupsResponse = ListLicensesGroupsResponses[keyof ListLicensesGroupsResponses]; + +export type ListContentMigrationsGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/content_migrations'; +}; + +export type ListContentMigrationsGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListContentMigrationsGroupsResponse = ListContentMigrationsGroupsResponses[keyof ListContentMigrationsGroupsResponses]; + +export type CreateContentMigrationGroupsData = { + body: { + /** + * Move anything scheduled for day 'X' to the specified day. (0-Sunday, + * 1-Monday, 2-Tuesday, 3-Wednesday, 4-Thursday, 5-Friday, 6-Saturday) + */ + 'date_shift_options[day_substitutions][X]'?: number; + /** + * The new end date for the source content/course + */ + 'date_shift_options[new_end_date]'?: string; + /** + * The new start date for the content/course + */ + 'date_shift_options[new_start_date]'?: string; + /** + * The original end date of the source content/course + */ + 'date_shift_options[old_end_date]'?: string; + /** + * The original start date of the source content/course + */ + 'date_shift_options[old_start_date]'?: string; + /** + * Whether to remove dates in the copied course. Cannot be used + * in conjunction with *shift_dates*. + */ + 'date_shift_options[remove_dates]'?: boolean; + /** + * Whether to shift dates in the copied course + */ + 'date_shift_options[shift_dates]'?: boolean; + /** + * The type of the migration. Use the + * {api:ContentMigrationsController#available_migrators Migrator} endpoint to + * see all available migrators. Default allowed values: + * canvas_cartridge_importer, common_cartridge_importer, + * course_copy_importer, zip_file_importer, qti_converter, moodle_converter + */ + migration_type: string; + /** + * Required if uploading a file. This is the first step in uploading a file + * to the content migration. See the {file:file_uploads.html File Upload + * Documentation} for details on the file upload workflow. + */ + 'pre_attachment[name]'?: string; + /** + * Other file upload properties, See {file:file_uploads.html File Upload + * Documentation} + */ + 'pre_attachment[todo]'?: string; + /** + * A URL to download the file from. Must not require authentication. + */ + 'settings[file_url]'?: string; + /** + * The folder to unzip the .zip file into for a zip_file_import. + */ + 'settings[folder_id]'?: string; + /** + * Whether to overwrite quizzes with the same identifiers between content + * packages. + */ + 'settings[overwrite_quizzes]'?: boolean; + /** + * The existing question bank ID to import questions into if not specified in + * the content package. + */ + 'settings[question_bank_id]'?: number; + /** + * The question bank to import questions into if not specified in the content + * package, if both bank id and name are set, id will take precedence. + */ + 'settings[question_bank_name]'?: string; + /** + * The course to copy from for a course copy migration. (required if doing + * course copy) + */ + 'settings[source_course_id]'?: string; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/content_migrations'; +}; + +export type CreateContentMigrationGroupsResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type CreateContentMigrationGroupsResponse = CreateContentMigrationGroupsResponses[keyof CreateContentMigrationGroupsResponses]; + +export type ListMigrationSystemsGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/content_migrations/migrators'; +}; + +export type ListMigrationSystemsGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListMigrationSystemsGroupsResponse = ListMigrationSystemsGroupsResponses[keyof ListMigrationSystemsGroupsResponses]; + +export type ListMigrationIssuesGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + content_migration_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/content_migrations/{content_migration_id}/migration_issues'; +}; + +export type ListMigrationIssuesGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListMigrationIssuesGroupsResponse = ListMigrationIssuesGroupsResponses[keyof ListMigrationIssuesGroupsResponses]; + +export type GetMigrationIssueGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + content_migration_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/content_migrations/{content_migration_id}/migration_issues/{id}'; +}; + +export type GetMigrationIssueGroupsResponses = { + /** + * No response was specified + */ + 200: MigrationIssue; +}; + +export type GetMigrationIssueGroupsResponse = GetMigrationIssueGroupsResponses[keyof GetMigrationIssueGroupsResponses]; + +export type UpdateMigrationIssueGroupsData = { + body: { + /** + * Set the workflow_state of the issue. + */ + workflow_state: 'active' | 'resolved'; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + content_migration_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/content_migrations/{content_migration_id}/migration_issues/{id}'; +}; + +export type UpdateMigrationIssueGroupsResponses = { + /** + * No response was specified + */ + 200: MigrationIssue; +}; + +export type UpdateMigrationIssueGroupsResponse = UpdateMigrationIssueGroupsResponses[keyof UpdateMigrationIssueGroupsResponses]; + +export type GetContentMigrationGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/content_migrations/{id}'; +}; + +export type GetContentMigrationGroupsResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type GetContentMigrationGroupsResponse = GetContentMigrationGroupsResponses[keyof GetContentMigrationGroupsResponses]; + +export type UpdateContentMigrationGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/content_migrations/{id}'; +}; + +export type UpdateContentMigrationGroupsResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type UpdateContentMigrationGroupsResponse = UpdateContentMigrationGroupsResponses[keyof UpdateContentMigrationGroupsResponses]; + +export type ListDiscussionTopicsGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * If "all_dates" is passed, all dates associated with graded discussions' + * assignments will be included. + * if "sections" is passed, includes the course sections that are associated + * with the topic, if the topic is specific to certain sections of the course. + * If "sections_user_count" is passed, then: + * (a) If sections were asked for *and* the topic is specific to certain + * course sections, includes the number of users in each + * section. (as part of the section json asked for above) + * (b) Else, includes at the root level the total number of users in the + * topic's context (group or course) that the topic applies to. + * If "overrides" is passed, the overrides for the assignment will be included + */ + include?: 'all_dates' | 'sections' | 'sections_user_count' | 'overrides'; + /** + * Determines the order of the discussion topic list. Defaults to "position". + */ + order_by?: 'position' | 'recent_activity' | 'title'; + /** + * Only return discussion topics in the given state(s). Defaults to including + * all topics. Filtering is done after pagination, so pages + * may be smaller than requested if topics are filtered. + * Can pass multiple states as comma separated string. + */ + scope?: 'locked' | 'unlocked' | 'pinned' | 'unpinned'; + /** + * Return announcements instead of discussion topics. Defaults to false + */ + only_announcements?: boolean; + /** + * The state of the discussion topic to return. Currently only supports unread state. + */ + filter_by?: 'all' | 'unread'; + /** + * The partial title of the discussion topics to match and return. + */ + search_term?: string; + /** + * For students, exclude topics that are locked by module progression. + * Defaults to false. + */ + exclude_context_module_locked_topics?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/discussion_topics'; +}; + +export type ListDiscussionTopicsGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListDiscussionTopicsGroupsResponse = ListDiscussionTopicsGroupsResponses[keyof ListDiscussionTopicsGroupsResponses]; + +export type CreateNewDiscussionTopicGroupsData = { + body?: { + /** + * Whether or not users can rate entries in this topic. + */ + allow_rating?: boolean; + /** + * To create an assignment discussion, pass the assignment parameters as a + * sub-object. See the {api:AssignmentsApiController#create Create an Assignment API} + * for the available parameters. The name parameter will be ignored, as it's + * taken from the discussion title. If you want to make a discussion that was + * an assignment NOT an assignment, pass set_assignment = false as part of + * the assignment object + */ + assignment?: unknown; + /** + * A application/x-www-form-urlencoded form-field-style attachment. + * Attachments larger than 1 kilobyte are subject to quota restrictions. + */ + attachment?: Blob | File; + /** + * If a timestamp is given, the topic will not be published until that time. + */ + delayed_post_at?: string; + /** + * The type of discussion. Defaults to side_comment if not value is given. Accepted values are 'side_comment', for discussions that only allow one level of nested comments, and 'threaded' for fully threaded discussions. + */ + discussion_type?: 'side_comment' | 'threaded'; + /** + * If present, the topic will become a group discussion assigned + * to the group. + */ + group_category_id?: number; + /** + * If true, this topic is an announcement. It will appear in the + * announcement's section rather than the discussions section. This requires + * announcment-posting permissions. + */ + is_announcement?: boolean; + /** + * If a timestamp is given, the topic will be scheduled to lock at the + * provided timestamp. If the timestamp is in the past, the topic will be + * locked. + */ + lock_at?: string; + /** + * no description + */ + message?: string; + /** + * If true, only graders will be allowed to rate entries. + */ + only_graders_can_rate?: boolean; + /** + * If true, this topic will be listed in the "Pinned Discussion" section + */ + pinned?: boolean; + /** + * If true, the topic will have an associated podcast feed. + */ + podcast_enabled?: boolean; + /** + * If true, the podcast will include posts from students as well. Implies + * podcast_enabled. + */ + podcast_has_student_posts?: boolean; + /** + * By default, discussions are sorted chronologically by creation date, you + * can pass the id of another topic to have this one show up after the other + * when they are listed. + */ + position_after?: string; + /** + * Whether this topic is published (true) or draft state (false). Only + * teachers and TAs have the ability to create draft state topics. + */ + published?: boolean; + /** + * If true then a user may not respond to other replies until that user has + * made an initial reply. Defaults to false. + */ + require_initial_post?: boolean; + /** + * If true, entries will be sorted by rating. + */ + sort_by_rating?: boolean; + /** + * A comma-separated list of sections ids to which the discussion topic + * should be made specific too. If it is not desired to make the discussion + * topic specific to sections, then this parameter may be omitted or set to + * "all". Can only be present only on announcements and only those that are + * for a course (as opposed to a group). + */ + specific_sections?: string; + /** + * no description + */ + title?: string; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics'; +}; + +export type CreateNewDiscussionTopicGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ReorderPinnedTopicsGroupsData = { + body: { + /** + * The ids of the pinned discussion topics in the desired order. + * (For example, "order=104,102,103".) + */ + order: Array; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/reorder'; +}; + +export type ReorderPinnedTopicsGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteTopicGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}'; +}; + +export type DeleteTopicGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleTopicGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: { + /** + * If "all_dates" is passed, all dates associated with graded discussions' + * assignments will be included. + * if "sections" is passed, includes the course sections that are associated + * with the topic, if the topic is specific to certain sections of the course. + * If "sections_user_count" is passed, then: + * (a) If sections were asked for *and* the topic is specific to certain + * course sections, includes the number of users in each + * section. (as part of the section json asked for above) + * (b) Else, includes at the root level the total number of users in the + * topic's context (group or course) that the topic applies to. + * If "overrides" is passed, the overrides for the assignment will be included + */ + include?: 'all_dates' | 'sections' | 'sections_user_count' | 'overrides'; + }; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}'; +}; + +export type GetSingleTopicGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateTopicGroupsData = { + body?: { + /** + * If true, users will be allowed to rate entries. + */ + allow_rating?: boolean; + /** + * To create an assignment discussion, pass the assignment parameters as a + * sub-object. See the {api:AssignmentsApiController#create Create an Assignment API} + * for the available parameters. The name parameter will be ignored, as it's + * taken from the discussion title. If you want to make a discussion that was + * an assignment NOT an assignment, pass set_assignment = false as part of + * the assignment object + */ + assignment?: unknown; + /** + * If a timestamp is given, the topic will not be published until that time. + */ + delayed_post_at?: string; + /** + * The type of discussion. Defaults to side_comment if not value is given. Accepted values are 'side_comment', for discussions that only allow one level of nested comments, and 'threaded' for fully threaded discussions. + */ + discussion_type?: 'side_comment' | 'threaded'; + /** + * If present, the topic will become a group discussion assigned + * to the group. + */ + group_category_id?: number; + /** + * If true, this topic is an announcement. It will appear in the + * announcement's section rather than the discussions section. This requires + * announcment-posting permissions. + */ + is_announcement?: boolean; + /** + * If a timestamp is given, the topic will be scheduled to lock at the + * provided timestamp. If the timestamp is in the past, the topic will be + * locked. + */ + lock_at?: string; + /** + * no description + */ + message?: string; + /** + * If true, only graders will be allowed to rate entries. + */ + only_graders_can_rate?: boolean; + /** + * If true, this topic will be listed in the "Pinned Discussion" section + */ + pinned?: boolean; + /** + * If true, the topic will have an associated podcast feed. + */ + podcast_enabled?: boolean; + /** + * If true, the podcast will include posts from students as well. Implies + * podcast_enabled. + */ + podcast_has_student_posts?: boolean; + /** + * By default, discussions are sorted chronologically by creation date, you + * can pass the id of another topic to have this one show up after the other + * when they are listed. + */ + position_after?: string; + /** + * Whether this topic is published (true) or draft state (false). Only + * teachers and TAs have the ability to create draft state topics. + */ + published?: boolean; + /** + * If true then a user may not respond to other replies until that user has + * made an initial reply. Defaults to false. + */ + require_initial_post?: boolean; + /** + * If true, entries will be sorted by rating. + */ + sort_by_rating?: boolean; + /** + * A comma-separated list of sections ids to which the discussion topic + * should be made specific too. If it is not desired to make the discussion + * topic specific to sections, then this parameter may be omitted or set to + * "all". Can only be present only on announcements and only those that are + * for a course (as opposed to a group). + */ + specific_sections?: string; + /** + * no description + */ + title?: string; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}'; +}; + +export type UpdateTopicGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListTopicEntriesGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries'; +}; + +export type ListTopicEntriesGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type PostEntryGroupsData = { + body?: { + /** + * a application/x-www-form-urlencoded form-field-style + * attachment. Attachments larger than 1 kilobyte are subject to quota + * restrictions. + */ + attachment?: string; + /** + * The body of the entry. + */ + message?: string; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries'; +}; + +export type PostEntryGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RateEntryGroupsData = { + body?: { + /** + * A rating to set on this entry. Only 0 and 1 are accepted. + */ + rating?: number; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + entry_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{entry_id}/rating'; +}; + +export type RateEntryGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkEntryAsUnreadGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + entry_id: string; + }; + query?: { + /** + * A boolean value to set the entry's forced_read_state. No change is made if + * this argument is not specified. + */ + forced_read_state?: boolean; + }; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{entry_id}/read'; +}; + +export type MarkEntryAsUnreadGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkEntryAsReadGroupsData = { + body?: { + /** + * A boolean value to set the entry's forced_read_state. No change is made if + * this argument is not specified. + */ + forced_read_state?: boolean; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + entry_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{entry_id}/read'; +}; + +export type MarkEntryAsReadGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListEntryRepliesGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + entry_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{entry_id}/replies'; +}; + +export type ListEntryRepliesGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type PostReplyGroupsData = { + body?: { + /** + * a application/x-www-form-urlencoded form-field-style + * attachment. Attachments larger than 1 kilobyte are subject to quota + * restrictions. + */ + attachment?: string; + /** + * The body of the entry. + */ + message?: string; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + entry_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{entry_id}/replies'; +}; + +export type PostReplyGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteEntryGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{id}'; +}; + +export type DeleteEntryGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateEntryGroupsData = { + body?: { + /** + * The updated body of the entry. + */ + message?: string; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entries/{id}'; +}; + +export type UpdateEntryGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListEntriesGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: { + /** + * A list of entry ids to retrieve. Entries will be returned in id order, + * smallest id first. + */ + ids?: Array; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/entry_list'; +}; + +export type ListEntriesGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkTopicAsUnreadGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/read'; +}; + +export type MarkTopicAsUnreadGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkTopicAsReadGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/read'; +}; + +export type MarkTopicAsReadGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkAllEntriesAsUnreadGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: { + /** + * A boolean value to set all of the entries' forced_read_state. No change is + * made if this argument is not specified. + */ + forced_read_state?: boolean; + }; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/read_all'; +}; + +export type MarkAllEntriesAsUnreadGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkAllEntriesAsReadGroupsData = { + body?: { + /** + * A boolean value to set all of the entries' forced_read_state. No change + * is made if this argument is not specified. + */ + forced_read_state?: boolean; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/read_all'; +}; + +export type MarkAllEntriesAsReadGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UnsubscribeFromTopicGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/subscribed'; +}; + +export type UnsubscribeFromTopicGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SubscribeToTopicGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/subscribed'; +}; + +export type SubscribeToTopicGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetFullTopicGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + topic_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/discussion_topics/{topic_id}/view'; +}; + +export type GetFullTopicGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListExternalFeedsGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/external_feeds'; +}; + +export type ListExternalFeedsGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListExternalFeedsGroupsResponse = ListExternalFeedsGroupsResponses[keyof ListExternalFeedsGroupsResponses]; + +export type CreateExternalFeedGroupsData = { + body: { + /** + * If given, only feed entries that contain this string in their title will be imported + */ + header_match?: boolean; + /** + * The url to the external rss or atom feed + */ + url: string; + /** + * Defaults to "full" + */ + verbosity?: 'full' | 'truncate' | 'link_only'; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/external_feeds'; +}; + +export type CreateExternalFeedGroupsResponses = { + /** + * No response was specified + */ + 200: ExternalFeed; +}; + +export type CreateExternalFeedGroupsResponse = CreateExternalFeedGroupsResponses[keyof CreateExternalFeedGroupsResponses]; + +export type DeleteExternalFeedGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + external_feed_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/external_feeds/{external_feed_id}'; +}; + +export type DeleteExternalFeedGroupsResponses = { + /** + * No response was specified + */ + 200: ExternalFeed; +}; + +export type DeleteExternalFeedGroupsResponse = DeleteExternalFeedGroupsResponses[keyof DeleteExternalFeedGroupsResponses]; + +export type ListExternalToolsGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The partial name of the tools to match and return. + */ + search_term?: string; + /** + * If true, then only tools that are meant to be selectable are returned + */ + selectable?: boolean; + /** + * If true, then include tools installed in all accounts above the current context + */ + include_parents?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/external_tools'; +}; + +export type ListExternalToolsGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UploadFileToGroupData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/files'; +}; + +export type UploadFileToGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetQuotaInformationGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/files/quota'; +}; + +export type GetQuotaInformationGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetFileGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * Array of additional information to include. + * + * "user":: the user who uploaded the file or last edited its content + * "usage_rights":: copyright and license information for the file (see UsageRights) + */ + include?: 'user'; + }; + url: '/v1/groups/{group_id}/files/{id}'; +}; + +export type GetFileGroupsResponses = { + /** + * No response was specified + */ + 200: File; +}; + +export type GetFileGroupsResponse = GetFileGroupsResponses[keyof GetFileGroupsResponses]; + +export type ListAllFoldersGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/folders'; +}; + +export type ListAllFoldersGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAllFoldersGroupsResponse = ListAllFoldersGroupsResponses[keyof ListAllFoldersGroupsResponses]; + +export type CreateFolderGroupsData = { + body: { + /** + * Flag the folder as hidden + */ + hidden?: boolean; + /** + * The datetime to lock the folder at + */ + lock_at?: string; + /** + * Flag the folder as locked + */ + locked?: boolean; + /** + * The name of the folder + */ + name: string; + /** + * The id of the folder to store the file in. If this and parent_folder_path are sent an error will be returned. If neither is given, a default folder will be used. + */ + parent_folder_id?: string; + /** + * The path of the folder to store the new folder in. The path separator is the forward slash `/`, never a back slash. The parent folder will be created if it does not already exist. This parameter only applies to new folders in a context that has folders, such as a user, a course, or a group. If this and parent_folder_id are sent an error will be returned. If neither is given, a default folder will be used. + */ + parent_folder_path?: string; + /** + * Set an explicit sort position for the folder + */ + position?: number; + /** + * The datetime to unlock the folder at + */ + unlock_at?: string; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/folders'; +}; + +export type CreateFolderGroupsResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type CreateFolderGroupsResponse = CreateFolderGroupsResponses[keyof CreateFolderGroupsResponses]; + +export type ResolvePathGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/folders/by_path'; +}; + +export type ResolvePathGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ResolvePathGroupsResponse = ResolvePathGroupsResponses[keyof ResolvePathGroupsResponses]; + +export type ResolvePathGroupsFullPathData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/folders/by_path/*full_path'; +}; + +export type ResolvePathGroupsFullPathResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ResolvePathGroupsFullPathResponse = ResolvePathGroupsFullPathResponses[keyof ResolvePathGroupsFullPathResponses]; + +export type GetFolderGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/folders/{id}'; +}; + +export type GetFolderGroupsResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type GetFolderGroupsResponse = GetFolderGroupsResponses[keyof GetFolderGroupsResponses]; + +export type ShowFrontPageGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/front_page'; +}; + +export type ShowFrontPageGroupsResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type ShowFrontPageGroupsResponse = ShowFrontPageGroupsResponses[keyof ShowFrontPageGroupsResponses]; + +export type UpdateCreateFrontPageGroupsData = { + body?: { + /** + * The content for the new page. + */ + 'wiki_page[body]'?: string; + /** + * Which user roles are allowed to edit this page. Any combination + * of these roles is allowed (separated by commas). + * + * "teachers":: Allows editing by teachers in the course. + * "students":: Allows editing by students in the course. + * "members":: For group wikis, allows editing by members of the group. + * "public":: Allows editing by any user. + */ + 'wiki_page[editing_roles]'?: 'teachers' | 'students' | 'members' | 'public'; + /** + * Whether participants should be notified when this page changes. + */ + 'wiki_page[notify_of_update]'?: boolean; + /** + * Whether the page is published (true) or draft state (false). + */ + 'wiki_page[published]'?: boolean; + /** + * The title for the new page. NOTE: changing a page's title will change its + * url. The updated url will be returned in the result. + */ + 'wiki_page[title]'?: string; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/front_page'; +}; + +export type UpdateCreateFrontPageGroupsResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type UpdateCreateFrontPageGroupsResponse = UpdateCreateFrontPageGroupsResponses[keyof UpdateCreateFrontPageGroupsResponses]; + +export type InviteOthersToGroupData = { + body: { + /** + * An array of email addresses to be sent invitations. + */ + invitees: Array; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/invite'; +}; + +export type InviteOthersToGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListGroupMembershipsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * Only list memberships with the given workflow_states. By default it will + * return all memberships. + */ + filter_states?: 'accepted' | 'invited' | 'requested'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/memberships'; +}; + +export type ListGroupMembershipsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListGroupMembershipsResponse = ListGroupMembershipsResponses[keyof ListGroupMembershipsResponses]; + +export type CreateMembershipData = { + body?: { + /** + * no description + */ + user_id?: string; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/memberships'; +}; + +export type CreateMembershipResponses = { + /** + * No response was specified + */ + 200: GroupMembership; +}; + +export type CreateMembershipResponse = CreateMembershipResponses[keyof CreateMembershipResponses]; + +export type LeaveGroupMembershipsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + membership_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/memberships/{membership_id}'; +}; + +export type LeaveGroupMembershipsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleGroupMembershipMembershipsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + membership_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/memberships/{membership_id}'; +}; + +export type GetSingleGroupMembershipMembershipsResponses = { + /** + * No response was specified + */ + 200: GroupMembership; +}; + +export type GetSingleGroupMembershipMembershipsResponse = GetSingleGroupMembershipMembershipsResponses[keyof GetSingleGroupMembershipMembershipsResponses]; + +export type UpdateMembershipMembershipsData = { + body?: { + /** + * no description + */ + moderator?: string; + /** + * Currently, the only allowed value is "accepted" + */ + workflow_state?: 'accepted'; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + membership_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/memberships/{membership_id}'; +}; + +export type UpdateMembershipMembershipsResponses = { + /** + * No response was specified + */ + 200: GroupMembership; +}; + +export type UpdateMembershipMembershipsResponse = UpdateMembershipMembershipsResponses[keyof UpdateMembershipMembershipsResponses]; + +export type ListPagesGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * Sort results by this field. + */ + sort?: 'title' | 'created_at' | 'updated_at'; + /** + * The sorting order. Defaults to 'asc'. + */ + order?: 'asc' | 'desc'; + /** + * The partial title of the pages to match and return. + */ + search_term?: string; + /** + * If true, include only published paqes. If false, exclude published + * pages. If not present, do not filter on published status. + */ + published?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/pages'; +}; + +export type ListPagesGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListPagesGroupsResponse = ListPagesGroupsResponses[keyof ListPagesGroupsResponses]; + +export type CreatePageGroupsData = { + body: { + /** + * The content for the new page. + */ + 'wiki_page[body]'?: string; + /** + * Which user roles are allowed to edit this page. Any combination + * of these roles is allowed (separated by commas). + * + * "teachers":: Allows editing by teachers in the course. + * "students":: Allows editing by students in the course. + * "members":: For group wikis, allows editing by members of the group. + * "public":: Allows editing by any user. + */ + 'wiki_page[editing_roles]'?: 'teachers' | 'students' | 'members' | 'public'; + /** + * Set an unhidden page as the front page (if true) + */ + 'wiki_page[front_page]'?: boolean; + /** + * Whether participants should be notified when this page changes. + */ + 'wiki_page[notify_of_update]'?: boolean; + /** + * Whether the page is published (true) or draft state (false). + */ + 'wiki_page[published]'?: boolean; + /** + * The title for the new page. + */ + 'wiki_page[title]': string; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/pages'; +}; + +export type CreatePageGroupsResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type CreatePageGroupsResponse = CreatePageGroupsResponses[keyof CreatePageGroupsResponses]; + +export type DeletePageGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + url: string; + }; + query?: never; + url: '/v1/groups/{group_id}/pages/{url}'; +}; + +export type DeletePageGroupsResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type DeletePageGroupsResponse = DeletePageGroupsResponses[keyof DeletePageGroupsResponses]; + +export type ShowPageGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + url: string; + }; + query?: never; + url: '/v1/groups/{group_id}/pages/{url}'; +}; + +export type ShowPageGroupsResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type ShowPageGroupsResponse = ShowPageGroupsResponses[keyof ShowPageGroupsResponses]; + +export type UpdateCreatePageGroupsData = { + body?: { + /** + * The content for the new page. + */ + 'wiki_page[body]'?: string; + /** + * Which user roles are allowed to edit this page. Any combination + * of these roles is allowed (separated by commas). + * + * "teachers":: Allows editing by teachers in the course. + * "students":: Allows editing by students in the course. + * "members":: For group wikis, allows editing by members of the group. + * "public":: Allows editing by any user. + */ + 'wiki_page[editing_roles]'?: 'teachers' | 'students' | 'members' | 'public'; + /** + * Set an unhidden page as the front page (if true) + */ + 'wiki_page[front_page]'?: boolean; + /** + * Whether participants should be notified when this page changes. + */ + 'wiki_page[notify_of_update]'?: boolean; + /** + * Whether the page is published (true) or draft state (false). + */ + 'wiki_page[published]'?: boolean; + /** + * The title for the new page. NOTE: changing a page's title will change its + * url. The updated url will be returned in the result. + */ + 'wiki_page[title]'?: string; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + url: string; + }; + query?: never; + url: '/v1/groups/{group_id}/pages/{url}'; +}; + +export type UpdateCreatePageGroupsResponses = { + /** + * No response was specified + */ + 200: Page; +}; + +export type UpdateCreatePageGroupsResponse = UpdateCreatePageGroupsResponses[keyof UpdateCreatePageGroupsResponses]; + +export type ListRevisionsGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + url: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/pages/{url}/revisions'; +}; + +export type ListRevisionsGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListRevisionsGroupsResponse = ListRevisionsGroupsResponses[keyof ListRevisionsGroupsResponses]; + +export type ShowRevisionGroupsLatestData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + url: string; + }; + query?: { + /** + * If set, exclude page content from results + */ + summary?: boolean; + }; + url: '/v1/groups/{group_id}/pages/{url}/revisions/latest'; +}; + +export type ShowRevisionGroupsLatestResponses = { + /** + * No response was specified + */ + 200: PageRevision; +}; + +export type ShowRevisionGroupsLatestResponse = ShowRevisionGroupsLatestResponses[keyof ShowRevisionGroupsLatestResponses]; + +export type ShowRevisionGroupsRevisionIdData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + url: string; + /** + * ID + */ + revision_id: string; + }; + query?: { + /** + * If set, exclude page content from results + */ + summary?: boolean; + }; + url: '/v1/groups/{group_id}/pages/{url}/revisions/{revision_id}'; +}; + +export type ShowRevisionGroupsRevisionIdResponses = { + /** + * No response was specified + */ + 200: PageRevision; +}; + +export type ShowRevisionGroupsRevisionIdResponse = ShowRevisionGroupsRevisionIdResponses[keyof ShowRevisionGroupsRevisionIdResponses]; + +export type RevertToRevisionGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + url: string; + /** + * The revision to revert to (use the + * {api:WikiPagesApiController#revisions List Revisions API} to see + * available revisions) + */ + revision_id: number; + }; + query?: never; + url: '/v1/groups/{group_id}/pages/{url}/revisions/{revision_id}'; +}; + +export type RevertToRevisionGroupsResponses = { + /** + * No response was specified + */ + 200: PageRevision; +}; + +export type RevertToRevisionGroupsResponse = RevertToRevisionGroupsResponses[keyof RevertToRevisionGroupsResponses]; + +export type GroupPermissionData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * List of permissions to check against the authenticated user. + * Permission names are documented in the {api:RoleOverridesController#add_role Create a role} endpoint. + */ + permissions?: Array; + }; + url: '/v1/groups/{group_id}/permissions'; +}; + +export type GroupPermissionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListPotentialMembersGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/potential_collaborators'; +}; + +export type ListPotentialMembersGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListPotentialMembersGroupsResponse = ListPotentialMembersGroupsResponses[keyof ListPotentialMembersGroupsResponses]; + +export type PreviewProcessedHtmlGroupData = { + body?: { + /** + * The html content to process + */ + html?: string; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/preview_html'; +}; + +export type PreviewProcessedHtmlGroupResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListAvailableTabsForCourseOrGroupGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * "external":: Optionally include external tool tabs in the returned list of tabs (Only has effect for courses, not groups) + */ + include?: 'external'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/tabs'; +}; + +export type ListAvailableTabsForCourseOrGroupGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RemoveUsageRightsGroupsData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query: { + /** + * List of ids of files to remove associated usage rights from. + */ + file_ids: Array; + /** + * List of ids of folders. Usage rights will be removed from all files in these folders. + */ + folder_ids?: Array; + }; + url: '/v1/groups/{group_id}/usage_rights'; +}; + +export type RemoveUsageRightsGroupsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SetUsageRightsGroupsData = { + body: { + /** + * List of ids of files to set usage rights for. + */ + file_ids: Array; + /** + * List of ids of folders to search for files to set usage rights for. + * Note that new files uploaded to these folders do not automatically inherit these rights. + */ + folder_ids?: Array; + /** + * Whether the file(s) or folder(s) should be published on save, provided that usage rights have been specified (set to `true` to publish on save). + */ + publish?: boolean; + /** + * The legal copyright line for the files + */ + 'usage_rights[legal_copyright]'?: string; + /** + * The license that applies to the files. See the {api:UsageRightsController#licenses List licenses endpoint} for the supported license types. + */ + 'usage_rights[license]'?: string; + /** + * The intellectual property justification for using the files in Canvas + */ + 'usage_rights[use_justification]': 'own_copyright' | 'used_by_permission' | 'fair_use' | 'public_domain' | 'creative_commons'; + }; + path: { + /** + * ID + */ + group_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/usage_rights'; +}; + +export type SetUsageRightsGroupsResponses = { + /** + * No response was specified + */ + 200: UsageRights; +}; + +export type SetUsageRightsGroupsResponse = SetUsageRightsGroupsResponses[keyof SetUsageRightsGroupsResponses]; + +export type ListGroupSusersData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + }; + query?: { + /** + * The partial name or full ID of the users to match and return in the + * results list. Must be at least 3 characters. + */ + search_term?: string; + /** + * - "avatar_url": Include users' avatar_urls. + */ + include?: 'avatar_url'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/groups/{group_id}/users'; +}; + +export type ListGroupSusersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListGroupSusersResponse = ListGroupSusersResponses[keyof ListGroupSusersResponses]; + +export type LeaveGroupUsersData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/users/{user_id}'; +}; + +export type LeaveGroupUsersResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSingleGroupMembershipUsersData = { + body?: never; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/users/{user_id}'; +}; + +export type GetSingleGroupMembershipUsersResponses = { + /** + * No response was specified + */ + 200: GroupMembership; +}; + +export type GetSingleGroupMembershipUsersResponse = GetSingleGroupMembershipUsersResponses[keyof GetSingleGroupMembershipUsersResponses]; + +export type UpdateMembershipUsersData = { + body?: { + /** + * no description + */ + moderator?: string; + /** + * Currently, the only allowed value is "accepted" + */ + workflow_state?: 'accepted'; + }; + path: { + /** + * ID + */ + group_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/groups/{group_id}/users/{user_id}'; +}; + +export type UpdateMembershipUsersResponses = { + /** + * No response was specified + */ + 200: GroupMembership; +}; + +export type UpdateMembershipUsersResponse = UpdateMembershipUsersResponses[keyof UpdateMembershipUsersResponses]; + +export type CreateJwtData = { + body?: never; + path?: never; + query?: never; + url: '/v1/jwts'; +}; + +export type CreateJwtResponses = { + /** + * No response was specified + */ + 200: Jwt; +}; + +export type CreateJwtResponse = CreateJwtResponses[keyof CreateJwtResponses]; + +export type RefreshJwtData = { + body: { + /** + * An existing JWT token to be refreshed. The new token will have + * the same context and workflows as the existing token. + */ + jwt: string; + }; + path?: never; + query?: never; + url: '/v1/jwts/refresh'; +}; + +export type RefreshJwtResponses = { + /** + * No response was specified + */ + 200: Jwt; +}; + +export type RefreshJwtResponse = RefreshJwtResponses[keyof RefreshJwtResponses]; + +export type ShowOutcomeData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/outcomes/{id}'; +}; + +export type ShowOutcomeResponses = { + /** + * No response was specified + */ + 200: Outcome; +}; + +export type ShowOutcomeResponse = ShowOutcomeResponses[keyof ShowOutcomeResponses]; + +export type UpdateOutcomeData = { + body?: { + /** + * The new calculation int. Only applies if the calculation_method is "decaying_average" or "n_mastery" + */ + calculation_int?: number; + /** + * The new calculation method. + */ + calculation_method?: 'decaying_average' | 'n_mastery' | 'latest' | 'highest'; + /** + * The new outcome description. + */ + description?: string; + /** + * A friendly name shown in reports for outcomes with cryptic titles, + * such as common core standards names. + */ + display_name?: string; + /** + * The new mastery threshold for the embedded rubric criterion. + */ + mastery_points?: number; + /** + * The description of a new rating level for the embedded rubric criterion. + */ + 'ratings[description]'?: Array; + /** + * The points corresponding to a new rating level for the embedded rubric + * criterion. + */ + 'ratings[points]'?: Array; + /** + * The new outcome title. + */ + title?: string; + /** + * A custom GUID for the learning standard. + */ + vendor_guid?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/outcomes/{id}'; +}; + +export type UpdateOutcomeResponses = { + /** + * No response was specified + */ + 200: Outcome; +}; + +export type UpdateOutcomeResponse = UpdateOutcomeResponses[keyof UpdateOutcomeResponses]; + +export type ListPlannerItemsData = { + body?: never; + path?: never; + query?: { + /** + * Only return items starting from the given date. + * The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + */ + start_date?: string; + /** + * Only return items up to the given date. + * The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + */ + end_date?: string; + /** + * List of context codes of courses and/or groups whose items you want to see. + * If not specified, defaults to all contexts associated to the current user. + * Note that concluded courses will be ignored unless specified in the includes[] + * parameter. The format of this field is the context type, followed by an underscore, + * followed by the context id. For example: course_42, group_123 + */ + context_codes?: Array; + /** + * Only return items that have new or unread activity + */ + filter?: 'new_activity'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/planner/items'; +}; + +export type ListPlannerItemsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListPlannerOverridesData = { + body?: never; + path?: never; + query?: never; + url: '/v1/planner/overrides'; +}; + +export type ListPlannerOverridesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListPlannerOverridesResponse = ListPlannerOverridesResponses[keyof ListPlannerOverridesResponses]; + +export type CreatePlannerOverrideData = { + body?: { + /** + * If this is true, the item will not show in the opportunities list + */ + dismissed?: boolean; + /** + * If this is true, the item will show in the planner as completed + */ + marked_complete?: boolean; + /** + * ID of the item that you are overriding in the planner + */ + plannable_id?: number; + /** + * Type of the item that you are overriding in the planner + */ + plannable_type?: 'announcement' | 'assignment' | 'discussion_topic' | 'quiz' | 'wiki_page' | 'planner_note'; + }; + path?: never; + query?: never; + url: '/v1/planner/overrides'; +}; + +export type CreatePlannerOverrideResponses = { + /** + * No response was specified + */ + 200: PlannerOverride; +}; + +export type CreatePlannerOverrideResponse = CreatePlannerOverrideResponses[keyof CreatePlannerOverrideResponses]; + +export type DeletePlannerOverrideData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/planner/overrides/{id}'; +}; + +export type DeletePlannerOverrideResponses = { + /** + * No response was specified + */ + 200: PlannerOverride; +}; + +export type DeletePlannerOverrideResponse = DeletePlannerOverrideResponses[keyof DeletePlannerOverrideResponses]; + +export type ShowPlannerOverrideData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/planner/overrides/{id}'; +}; + +export type ShowPlannerOverrideResponses = { + /** + * No response was specified + */ + 200: PlannerOverride; +}; + +export type ShowPlannerOverrideResponse = ShowPlannerOverrideResponses[keyof ShowPlannerOverrideResponses]; + +export type UpdatePlannerOverrideData = { + body?: { + /** + * determines whether the planner item shows in the opportunities list + */ + dismissed?: string; + /** + * determines whether the planner item is marked as completed + */ + marked_complete?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/planner/overrides/{id}'; +}; + +export type UpdatePlannerOverrideResponses = { + /** + * No response was specified + */ + 200: PlannerOverride; +}; + +export type UpdatePlannerOverrideResponse = UpdatePlannerOverrideResponses[keyof UpdatePlannerOverrideResponses]; + +export type ListPlannerNotesData = { + body?: never; + path?: never; + query?: { + /** + * Only return notes with todo dates since the start_date (inclusive). + * No default. The value should be formatted as: yyyy-mm-dd or + * ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + */ + start_date?: string; + /** + * Only return notes with todo dates before the end_date (inclusive). + * No default. The value should be formatted as: yyyy-mm-dd or + * ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + * If end_date and start_date are both specified and equivalent, + * then only notes with todo dates on that day are returned. + */ + end_date?: string; + /** + * List of context codes of courses whose notes you want to see. + * If not specified, defaults to all contexts that the user belongs to. + * The format of this field is the context type, followed by an + * underscore, followed by the context id. For example: course_42 + * Including a code matching the user's own context code (e.g. user_1) + * will include notes that are not associated with any particular course. + */ + context_codes?: Array; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/planner_notes'; +}; + +export type ListPlannerNotesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListPlannerNotesResponse = ListPlannerNotesResponses[keyof ListPlannerNotesResponses]; + +export type CreatePlannerNoteData = { + body?: { + /** + * The ID of the course to associate with the planner note. The caller must be able to view the course in order to + * associate it with a planner note. + */ + course_id?: number; + /** + * Text of the planner note. + */ + details?: string; + /** + * The id of a learning object to link to this planner note. Must be used in conjunction with linked_object_type + * and course_id. The object must be in the same course as specified by course_id. If the title argument is not + * provided, the planner note will use the learning object's title as its title. Only one planner note may be + * linked to a specific learning object. + */ + linked_object_id?: number; + /** + * The type of a learning object to link to this planner note. Must be used in conjunction wtih linked_object_id + * and course_id. Valid linked_object_type values are: + * 'announcement', 'assignment', 'discussion_topic', 'wiki_page', 'quiz' + */ + linked_object_type?: string; + /** + * The title of the planner note. + */ + title?: string; + /** + * The date where this planner note should appear in the planner. + * The value should be formatted as: yyyy-mm-dd. + */ + todo_date?: string; + }; + path?: never; + query?: never; + url: '/v1/planner_notes'; +}; + +export type CreatePlannerNoteResponses = { + /** + * No response was specified + */ + 200: PlannerNote; +}; + +export type CreatePlannerNoteResponse = CreatePlannerNoteResponses[keyof CreatePlannerNoteResponses]; + +export type DeletePlannerNoteData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/planner_notes/{id}'; +}; + +export type DeletePlannerNoteResponses = { + /** + * No response was specified + */ + 200: PlannerNote; +}; + +export type DeletePlannerNoteResponse = DeletePlannerNoteResponses[keyof DeletePlannerNoteResponses]; + +export type ShowPlannernoteData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/planner_notes/{id}'; +}; + +export type ShowPlannernoteResponses = { + /** + * No response was specified + */ + 200: PlannerNote; +}; + +export type ShowPlannernoteResponse = ShowPlannernoteResponses[keyof ShowPlannernoteResponses]; + +export type UpdatePlannernoteData = { + body?: { + /** + * The ID of the course to associate with the planner note. The caller must be able to view the course in order to + * associate it with a planner note. Use a null or empty value to remove a planner note from a course. Note that if + * the planner note is linked to a learning object, its course_id cannot be changed. + */ + course_id?: number; + /** + * Text of the planner note. + */ + details?: string; + /** + * The title of the planner note. + */ + title?: string; + /** + * The date where this planner note should appear in the planner. + * The value should be formatted as: yyyy-mm-dd. + */ + todo_date?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/planner_notes/{id}'; +}; + +export type UpdatePlannernoteResponses = { + /** + * No response was specified + */ + 200: PlannerNote; +}; + +export type UpdatePlannernoteResponse = UpdatePlannernoteResponses[keyof UpdatePlannernoteResponses]; + +export type ListClosedPollSessionsData = { + body?: never; + path?: never; + query?: never; + url: '/v1/poll_sessions/closed'; +}; + +export type ListClosedPollSessionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListOpenedPollSessionsData = { + body?: never; + path?: never; + query?: never; + url: '/v1/poll_sessions/opened'; +}; + +export type ListOpenedPollSessionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListPollsData = { + body?: never; + path?: never; + query?: never; + url: '/v1/polls'; +}; + +export type ListPollsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateSinglePollData = { + body: { + /** + * A brief description or instructions for the poll. + */ + 'polls[description]'?: Array; + /** + * The title of the poll. + */ + 'polls[question]': Array; + }; + path?: never; + query?: never; + url: '/v1/polls'; +}; + +export type CreateSinglePollResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeletePollData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{id}'; +}; + +export type DeletePollResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSinglePollData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{id}'; +}; + +export type GetSinglePollResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateSinglePollData = { + body: { + /** + * A brief description or instructions for the poll. + */ + 'polls[description]'?: Array; + /** + * The title of the poll. + */ + 'polls[question]': Array; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{id}'; +}; + +export type UpdateSinglePollResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListPollChoicesInPollData = { + body?: never; + path: { + /** + * ID + */ + poll_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/polls/{poll_id}/poll_choices'; +}; + +export type ListPollChoicesInPollResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateSinglePollChoiceData = { + body: { + /** + * Whether this poll choice is considered correct or not. Defaults to false. + */ + 'poll_choices[is_correct]'?: Array; + /** + * The order this poll choice should be returned in the context it's sibling poll choices. + */ + 'poll_choices[position]'?: Array; + /** + * The descriptive text of the poll choice. + */ + 'poll_choices[text]': Array; + }; + path: { + /** + * ID + */ + poll_id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_choices'; +}; + +export type CreateSinglePollChoiceResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeletePollChoiceData = { + body?: never; + path: { + /** + * ID + */ + poll_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_choices/{id}'; +}; + +export type DeletePollChoiceResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSinglePollChoiceData = { + body?: never; + path: { + /** + * ID + */ + poll_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_choices/{id}'; +}; + +export type GetSinglePollChoiceResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateSinglePollChoiceData = { + body: { + /** + * Whether this poll choice is considered correct or not. Defaults to false. + */ + 'poll_choices[is_correct]'?: Array; + /** + * The order this poll choice should be returned in the context it's sibling poll choices. + */ + 'poll_choices[position]'?: Array; + /** + * The descriptive text of the poll choice. + */ + 'poll_choices[text]': Array; + }; + path: { + /** + * ID + */ + poll_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_choices/{id}'; +}; + +export type UpdateSinglePollChoiceResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListPollSessionsForPollData = { + body?: never; + path: { + /** + * ID + */ + poll_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/polls/{poll_id}/poll_sessions'; +}; + +export type ListPollSessionsForPollResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateSinglePollSessionData = { + body: { + /** + * The id of the course this session is associated with. + */ + 'poll_sessions[course_id]': Array; + /** + * The id of the course section this session is associated with. + */ + 'poll_sessions[course_section_id]'?: Array; + /** + * Whether or not results are viewable by students. + */ + 'poll_sessions[has_public_results]'?: Array; + }; + path: { + /** + * ID + */ + poll_id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_sessions'; +}; + +export type CreateSinglePollSessionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeletePollSessionData = { + body?: never; + path: { + /** + * ID + */ + poll_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_sessions/{id}'; +}; + +export type DeletePollSessionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetResultsForSinglePollSessionData = { + body?: never; + path: { + /** + * ID + */ + poll_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_sessions/{id}'; +}; + +export type GetResultsForSinglePollSessionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateSinglePollSessionData = { + body?: { + /** + * The id of the course this session is associated with. + */ + 'poll_sessions[course_id]'?: Array; + /** + * The id of the course section this session is associated with. + */ + 'poll_sessions[course_section_id]'?: Array; + /** + * Whether or not results are viewable by students. + */ + 'poll_sessions[has_public_results]'?: Array; + }; + path: { + /** + * ID + */ + poll_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_sessions/{id}'; +}; + +export type UpdateSinglePollSessionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CloseOpenedPollSessionData = { + body?: never; + path: { + /** + * ID + */ + poll_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_sessions/{id}/close'; +}; + +export type CloseOpenedPollSessionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type OpenPollSessionData = { + body?: never; + path: { + /** + * ID + */ + poll_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_sessions/{id}/open'; +}; + +export type OpenPollSessionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type CreateSinglePollSubmissionData = { + body: { + /** + * The chosen poll choice for this submission. + */ + 'poll_submissions[poll_choice_id]': Array; + }; + path: { + /** + * ID + */ + poll_id: string; + /** + * ID + */ + poll_session_id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_sessions/{poll_session_id}/poll_submissions'; +}; + +export type CreateSinglePollSubmissionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetSinglePollSubmissionData = { + body?: never; + path: { + /** + * ID + */ + poll_id: string; + /** + * ID + */ + poll_session_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/polls/{poll_id}/poll_sessions/{poll_session_id}/poll_submissions/{id}'; +}; + +export type GetSinglePollSubmissionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type QueryProgressData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/progress/{id}'; +}; + +export type QueryProgressResponses = { + /** + * No response was specified + */ + 200: Progress; +}; + +export type QueryProgressResponse = QueryProgressResponses[keyof QueryProgressResponses]; + +export type GetAllQuizSubmissionQuestionsData = { + body?: never; + path: { + /** + * ID + */ + quiz_submission_id: string; + }; + query?: { + /** + * Associations to include with the quiz submission question. + */ + include?: 'quiz_question'; + }; + url: '/v1/quiz_submissions/{quiz_submission_id}/questions'; +}; + +export type GetAllQuizSubmissionQuestionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type AnsweringQuestionsData = { + body: { + /** + * Access code for the Quiz, if any. + */ + access_code?: string; + /** + * The attempt number of the quiz submission being taken. Note that this + * must be the latest attempt index, as questions for earlier attempts can + * not be modified. + */ + attempt: number; + quiz_questions?: Array; + /** + * The unique validation token you received when the Quiz Submission was + * created. + */ + validation_token: string; + }; + path: { + /** + * ID + */ + quiz_submission_id: string; + }; + query?: never; + url: '/v1/quiz_submissions/{quiz_submission_id}/questions'; +}; + +export type AnsweringQuestionsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type AnsweringQuestionsResponse = AnsweringQuestionsResponses[keyof AnsweringQuestionsResponses]; + +export type FlaggingQuestionData = { + body: { + /** + * Access code for the Quiz, if any. + */ + access_code?: string; + /** + * The attempt number of the quiz submission being taken. Note that this + * must be the latest attempt index, as questions for earlier attempts can + * not be modified. + */ + attempt: number; + /** + * The unique validation token you received when the Quiz Submission was + * created. + */ + validation_token: string; + }; + path: { + /** + * ID + */ + quiz_submission_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/quiz_submissions/{quiz_submission_id}/questions/{id}/flag'; +}; + +export type FlaggingQuestionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UnflaggingQuestionData = { + body: { + /** + * Access code for the Quiz, if any. + */ + access_code?: string; + /** + * The attempt number of the quiz submission being taken. Note that this + * must be the latest attempt index, as questions for earlier attempts can + * not be modified. + */ + attempt: number; + /** + * The unique validation token you received when the Quiz Submission was + * created. + */ + validation_token: string; + }; + path: { + /** + * ID + */ + quiz_submission_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/quiz_submissions/{quiz_submission_id}/questions/{id}/unflag'; +}; + +export type UnflaggingQuestionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListAllCoursesData = { + body?: never; + path?: never; + query?: { + /** + * Search terms used for matching users/courses/groups (e.g. "bob smith"). If + * multiple terms are given (separated via whitespace), only results matching + * all terms will be returned. + */ + search?: string; + /** + * Only return courses with public content. Defaults to false. + */ + public_only?: boolean; + /** + * Only return courses that allow self enrollment. Defaults to false. + */ + open_enrollment_only?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/search/all_courses'; +}; + +export type ListAllCoursesResponses = { + /** + * Returns a list of courses. + */ + 200: Array; +}; + +export type ListAllCoursesResponse = ListAllCoursesResponses[keyof ListAllCoursesResponses]; + +export type FindRecipientsSearchData = { + body?: never; + path?: never; + query?: { + /** + * Search terms used for matching users/courses/groups (e.g. "bob smith"). If + * multiple terms are given (separated via whitespace), only results matching + * all terms will be returned. + */ + search?: string; + /** + * Limit the search to a particular course/group (e.g. "course_3" or "group_4"). + */ + context?: string; + /** + * Array of ids to exclude from the search. These may be user ids or + * course/group ids prefixed with "course_" or "group_" respectively, + * e.g. exclude[]=1&exclude[]=2&exclude[]=course_3 + */ + exclude?: Array; + /** + * Limit the search just to users or contexts (groups/courses). + */ + type?: 'user' | 'context'; + /** + * Search for a specific user id. This ignores the other above parameters, + * and will never return more than one result. + */ + user_id?: number; + /** + * When searching by user_id, only users that could be normally messaged by + * this user will be returned. This parameter allows you to specify a + * conversation that will be referenced for a shared context -- if both the + * current user and the searched user are in the conversation, the user will + * be returned. This is used to start new side conversations. + */ + from_conversation_id?: number; + /** + * Array of permission strings to be checked for each matched context (e.g. + * "send_messages"). This argument determines which permissions may be + * returned in the response; it won't prevent contexts from being returned if + * they don't grant the permission(s). + */ + permissions?: Array; + }; + url: '/v1/search/recipients'; +}; + +export type FindRecipientsSearchResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RedirectToAssignmentOverrideForSectionData = { + body?: never; + path: { + /** + * ID + */ + course_section_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: never; + url: '/v1/sections/{course_section_id}/assignments/{assignment_id}/override'; +}; + +export type RedirectToAssignmentOverrideForSectionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteSectionData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/sections/{id}'; +}; + +export type DeleteSectionResponses = { + /** + * No response was specified + */ + 200: Section; +}; + +export type DeleteSectionResponse = DeleteSectionResponses[keyof DeleteSectionResponses]; + +export type GetSectionInformationSectionsData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * - "students": Associations to include with the group. Note: this is only + * available if you have permission to view users or grades in the course + * - "avatar_url": Include the avatar URLs for students returned. + * - "enrollments": If 'students' is also included, return the section + * enrollment for each student + * - "total_students": Returns the total amount of active and invited students + * for the course section + * - "passback_status": Include the grade passback status. + */ + include?: 'students' | 'avatar_url' | 'enrollments' | 'total_students' | 'passback_status'; + }; + url: '/v1/sections/{id}'; +}; + +export type GetSectionInformationSectionsResponses = { + /** + * No response was specified + */ + 200: Section; +}; + +export type GetSectionInformationSectionsResponse = GetSectionInformationSectionsResponses[keyof GetSectionInformationSectionsResponses]; + +export type EditSectionData = { + body?: { + /** + * Section end date in ISO8601 format. e.g. 2011-01-01T01:00Z + */ + 'course_section[end_at]'?: string; + /** + * The integration_id of the section. Must have manage_sis permission to set. + */ + 'course_section[integration_id]'?: string; + /** + * The name of the section + */ + 'course_section[name]'?: string; + /** + * Set to true to restrict user enrollments to the start and end dates of the section. + */ + 'course_section[restrict_enrollments_to_section_dates]'?: boolean; + /** + * The sis ID of the section. Must have manage_sis permission to set. + */ + 'course_section[sis_section_id]'?: string; + /** + * Section start date in ISO8601 format, e.g. 2011-01-01T01:00Z + */ + 'course_section[start_at]'?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/sections/{id}'; +}; + +export type EditSectionResponses = { + /** + * No response was specified + */ + 200: Section; +}; + +export type EditSectionResponse = EditSectionResponses[keyof EditSectionResponses]; + +export type DeCrossListSectionData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/sections/{id}/crosslist'; +}; + +export type DeCrossListSectionResponses = { + /** + * No response was specified + */ + 200: Section; +}; + +export type DeCrossListSectionResponse = DeCrossListSectionResponses[keyof DeCrossListSectionResponses]; + +export type CrossListSectionData = { + body?: never; + path: { + /** + * ID + */ + id: string; + /** + * ID + */ + new_course_id: string; + }; + query?: never; + url: '/v1/sections/{id}/crosslist/{new_course_id}'; +}; + +export type CrossListSectionResponses = { + /** + * No response was specified + */ + 200: Section; +}; + +export type CrossListSectionResponse = CrossListSectionResponses[keyof CrossListSectionResponses]; + +export type GetAllPeerReviewsSectionsPeerReviewsData = { + body?: never; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * Associations to include with the peer review. + */ + include?: 'submission_comments' | 'user'; + }; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/peer_reviews'; +}; + +export type GetAllPeerReviewsSectionsPeerReviewsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAllPeerReviewsSectionsPeerReviewsResponse = GetAllPeerReviewsSectionsPeerReviewsResponses[keyof GetAllPeerReviewsSectionsPeerReviewsResponses]; + +export type SubmissionSummarySectionsData = { + body?: never; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * If this argument is true, the response will take into account student groups. + */ + grouped?: boolean; + }; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submission_summary'; +}; + +export type SubmissionSummarySectionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListAssignmentSubmissionsSectionsData = { + body?: never; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: { + /** + * Associations to include with the group. "group" will add group_id and group_name. + */ + include?: 'submission_history' | 'submission_comments' | 'rubric_assessment' | 'assignment' | 'visibility' | 'course' | 'user' | 'group'; + /** + * If this argument is true, the response will be grouped by student groups. + */ + grouped?: boolean; + /** + * The numeric value leading to the next paginated page. This needs to be parsed from the response header (Link field). + */ + page?: number; + /** + * The number of items to return. + */ + per_page?: number; + }; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions'; +}; + +export type ListAssignmentSubmissionsSectionsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAssignmentSubmissionsSectionsResponse = ListAssignmentSubmissionsSectionsResponses[keyof ListAssignmentSubmissionsSectionsResponses]; + +export type SubmitAssignmentSectionsData = { + body: { + /** + * Include a textual comment with the submission. + */ + 'comment[text_comment]'?: string; + /** + * Submit the assignment as an HTML document snippet. Note this HTML snippet + * will be sanitized using the same ruleset as a submission made from the + * Canvas web UI. The sanitized HTML will be returned in the response as the + * submission body. Requires a submission_type of "online_text_entry". + */ + 'submission[body]'?: string; + /** + * Submit the assignment as a set of one or more previously uploaded files + * residing in the submitting user's files section (or the group's files + * section, for group assignments). + * + * To upload a new file to submit, see the submissions {api:SubmissionsApiController#create_file Upload a file API}. + * + * Requires a submission_type of "online_upload". + */ + 'submission[file_ids]'?: Array; + /** + * The media comment id to submit. Media comment ids can be submitted via + * this API, however, note that there is not yet an API to generate or list + * existing media comments, so this functionality is currently of limited use. + * + * Requires a submission_type of "media_recording". + */ + 'submission[media_comment_id]'?: string; + /** + * The type of media comment being submitted. + */ + 'submission[media_comment_type]'?: 'audio' | 'video'; + /** + * The type of submission being made. The assignment submission_types must + * include this submission type as an allowed option, or the submission will be rejected with a 400 error. + * + * The submission_type given determines which of the following parameters is + * used. For instance, to submit a URL, submission [submission_type] must be + * set to "online_url", otherwise the submission [url] parameter will be + * ignored. + */ + 'submission[submission_type]': 'online_text_entry' | 'online_url' | 'online_upload' | 'media_recording' | 'basic_lti_launch'; + /** + * Submit the assignment as a URL. The URL scheme must be "http" or "https", + * no "ftp" or other URL schemes are allowed. If no scheme is given (e.g. + * "www.example.com") then "http" will be assumed. Requires a submission_type + * of "online_url" or "basic_lti_launch". + */ + 'submission[url]'?: string; + }; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: never; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions'; +}; + +export type SubmitAssignmentSectionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GradeOrCommentOnMultipleSubmissionsSectionsAssignmentsData = { + body?: { + /** + * Specifies which assignment to grade. This argument is not necessary when + * using the assignment-specific endpoints. + */ + 'grade_data[student_id][assignment_id]'?: number; + /** + * See documentation for the excuse argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][excuse]'?: boolean; + /** + * See documentation for the comment[] arguments in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][file_ids]'?: Array; + /** + * no description + */ + 'grade_data[student_id][group_comment]'?: boolean; + /** + * no description + */ + 'grade_data[student_id][media_comment_id]'?: string; + /** + * no description + */ + 'grade_data[student_id][media_comment_type]'?: 'audio' | 'video'; + /** + * See documentation for the posted_grade argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][posted_grade]'?: string; + /** + * See documentation for the rubric_assessment argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][rubric_assessment]'?: unknown; + /** + * no description + */ + 'grade_data[student_id][text_comment]'?: string; + }; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + }; + query?: never; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/update_grades'; +}; + +export type GradeOrCommentOnMultipleSubmissionsSectionsAssignmentsResponses = { + /** + * No response was specified + */ + 200: Progress; +}; + +export type GradeOrCommentOnMultipleSubmissionsSectionsAssignmentsResponse = GradeOrCommentOnMultipleSubmissionsSectionsAssignmentsResponses[keyof GradeOrCommentOnMultipleSubmissionsSectionsAssignmentsResponses]; + +export type DeletePeerReviewSectionsData = { + body?: never; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + }; + query: { + /** + * user_id to delete as reviewer on this assignment + */ + user_id: number; + }; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews'; +}; + +export type DeletePeerReviewSectionsResponses = { + /** + * No response was specified + */ + 200: PeerReview; +}; + +export type DeletePeerReviewSectionsResponse = DeletePeerReviewSectionsResponses[keyof DeletePeerReviewSectionsResponses]; + +export type GetAllPeerReviewsSectionsSubmissionsData = { + body?: never; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + }; + query?: { + /** + * Associations to include with the peer review. + */ + include?: 'submission_comments' | 'user'; + }; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews'; +}; + +export type GetAllPeerReviewsSectionsSubmissionsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type GetAllPeerReviewsSectionsSubmissionsResponse = GetAllPeerReviewsSectionsSubmissionsResponses[keyof GetAllPeerReviewsSectionsSubmissionsResponses]; + +export type CreatePeerReviewSectionsData = { + body: { + /** + * user_id to assign as reviewer on this assignment + */ + user_id: number; + }; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + submission_id: string; + }; + query?: never; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{submission_id}/peer_reviews'; +}; + +export type CreatePeerReviewSectionsResponses = { + /** + * No response was specified + */ + 200: PeerReview; +}; + +export type CreatePeerReviewSectionsResponse = CreatePeerReviewSectionsResponses[keyof CreatePeerReviewSectionsResponses]; + +export type GetSingleSubmissionSectionsData = { + body?: never; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * Associations to include with the group. + */ + include?: 'submission_history' | 'submission_comments' | 'rubric_assessment' | 'visibility' | 'course' | 'user'; + }; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{user_id}'; +}; + +export type GetSingleSubmissionSectionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GradeOrCommentOnSubmissionSectionsData = { + body?: { + /** + * Attach files to this comment that were previously uploaded using the + * Submission Comment API's files action + */ + 'comment[file_ids]'?: Array; + /** + * Whether or not this comment should be sent to the entire group (defaults + * to false). Ignored if this is not a group assignment or if no text_comment + * is provided. + */ + 'comment[group_comment]'?: boolean; + /** + * Add an audio/video comment to the submission. Media comments can be added + * via this API, however, note that there is not yet an API to generate or + * list existing media comments, so this functionality is currently of + * limited use. + */ + 'comment[media_comment_id]'?: string; + /** + * The type of media comment being added. + */ + 'comment[media_comment_type]'?: 'audio' | 'video'; + /** + * Add a textual comment to the submission. + */ + 'comment[text_comment]'?: string; + /** + * Whether this assignment is visible to the owner of the submission + */ + 'include[visibility]'?: string; + /** + * Assign a rubric assessment to this assignment submission. The + * sub-parameters here depend on the rubric for the assignment. The general + * format is, for each row in the rubric: + * + * The points awarded for this row. + * rubric_assessment[criterion_id][points] + * + * Comments to add for this row. + * rubric_assessment[criterion_id][comments] + * + * For example, if the assignment rubric is (in JSON format): + * !!!javascript + * [ + * { + * 'id': 'crit1', + * 'points': 10, + * 'description': 'Criterion 1', + * 'ratings': + * [ + * { 'description': 'Good', 'points': 10 }, + * { 'description': 'Poor', 'points': 3 } + * ] + * }, + * { + * 'id': 'crit2', + * 'points': 5, + * 'description': 'Criterion 2', + * 'ratings': + * [ + * { 'description': 'Complete', 'points': 5 }, + * { 'description': 'Incomplete', 'points': 0 } + * ] + * } + * ] + * + * Then a possible set of values for rubric_assessment would be: + * rubric_assessment[crit1][points]=3&rubric_assessment[crit2][points]=5&rubric_assessment[crit2][comments]=Well%20Done. + */ + rubric_assessment?: unknown; + /** + * Sets the "excused" status of an assignment. + */ + 'submission[excuse]'?: boolean; + /** + * Sets the late policy status to either "late", "missing", "none", or null. + */ + 'submission[late_policy_status]'?: string; + /** + * Assign a score to the submission, updating both the "score" and "grade" + * fields on the submission record. This parameter can be passed in a few + * different formats: + * + * points:: A floating point or integral value, such as "13.5". The grade + * will be interpreted directly as the score of the assignment. + * Values above assignment.points_possible are allowed, for awarding + * extra credit. + * percentage:: A floating point value appended with a percent sign, such as + * "40%". The grade will be interpreted as a percentage score on the + * assignment, where 100% == assignment.points_possible. Values above 100% + * are allowed, for awarding extra credit. + * letter grade:: A letter grade, following the assignment's defined letter + * grading scheme. For example, "A-". The resulting score will be the high + * end of the defined range for the letter grade. For instance, if "B" is + * defined as 86% to 84%, a letter grade of "B" will be worth 86%. The + * letter grade will be rejected if the assignment does not have a defined + * letter grading scheme. For more fine-grained control of scores, pass in + * points or percentage rather than the letter grade. + * "pass/complete/fail/incomplete":: A string value of "pass" or "complete" + * will give a score of 100%. "fail" or "incomplete" will give a score of + * 0. + * + * Note that assignments with grading_type of "pass_fail" can only be + * assigned a score of 0 or assignment.points_possible, nothing inbetween. If + * a posted_grade in the "points" or "percentage" format is sent, the grade + * will only be accepted if the grade equals one of those two values. + */ + 'submission[posted_grade]'?: string; + /** + * Sets the seconds late if late policy status is "late" + */ + 'submission[seconds_late_override]'?: number; + }; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{user_id}'; +}; + +export type GradeOrCommentOnSubmissionSectionsResponses = { + /** + * No response was specified + */ + 200: Submission; +}; + +export type GradeOrCommentOnSubmissionSectionsResponse = GradeOrCommentOnSubmissionSectionsResponses[keyof GradeOrCommentOnSubmissionSectionsResponses]; + +export type UploadFileSectionsData = { + body?: never; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{user_id}/files'; +}; + +export type UploadFileSectionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkSubmissionAsUnreadSectionsData = { + body?: never; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{user_id}/read'; +}; + +export type MarkSubmissionAsUnreadSectionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MarkSubmissionAsReadSectionsData = { + body?: never; + path: { + /** + * ID + */ + section_id: string; + /** + * ID + */ + assignment_id: string; + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/sections/{section_id}/assignments/{assignment_id}/submissions/{user_id}/read'; +}; + +export type MarkSubmissionAsReadSectionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListEnrollmentsSectionsData = { + body?: never; + path: { + /** + * ID + */ + section_id: number; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + /** + * A list of enrollment types to return. Accepted values are 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'DesignerEnrollment', and 'ObserverEnrollment.' If omitted, all enrollment types are returned. This argument is ignored if `role` is given. + */ + type?: Array; + /** + * A list of enrollment roles to return. Accepted values include course-level roles created by the {api:RoleOverridesController#add_role Add Role API} as well as the base enrollment types accepted by the `type` argument above. + */ + role?: Array; + /** + * Filter by enrollment state. If omitted, 'active' and 'invited' enrollments are returned. When querying a user's enrollments (either via user_id argument or via user enrollments endpoint), the following additional synthetic states are supported: "current_and_invited"|"current_and_future"|"current_and_concluded" + */ + state?: 'active' | 'invited' | 'creation_pending' | 'deleted' | 'rejected' | 'completed' | 'inactive'; + /** + * Array of additional information to include on the enrollment or user records. "avatar_url" and "group_ids" will be returned on the user record. + */ + include?: 'avatar_url' | 'group_ids' | 'locked' | 'observed_users' | 'can_be_removed'; + /** + * Filter by user_id (only valid for course or section enrollment queries). If set to the current user's id, this is a way to determine if the user has any enrollments in the course or section, independent of whether the user has permission to view other people on the roster. + */ + user_id?: number; + /** + * Return grades for the given grading_period. If this parameter is not specified, the returned grades will be for the whole course. + */ + grading_period_id?: number; + /** + * Returns only enrollments for the specified enrollment term. This parameter only applies to the user enrollments path. May pass the ID from the enrollment terms api or the SIS id prepended with 'sis_term_id:'. + */ + enrollment_term_id?: number; + /** + * Returns only enrollments for the specified SIS account ID(s). Does not look into sub_accounts. May pass in array or string. + */ + sis_account_id?: Array; + /** + * Returns only enrollments matching the specified SIS course ID(s). May pass in array or string. + */ + sis_course_id?: Array; + /** + * Returns only section enrollments matching the specified SIS section ID(s). May pass in array or string. + */ + sis_section_id?: Array; + /** + * Returns only enrollments for the specified SIS user ID(s). May pass in array or string. + */ + sis_user_id?: Array; + }; + url: '/v1/sections/{section_id}/enrollments'; +}; + +export type ListEnrollmentsSectionsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListEnrollmentsSectionsResponse = ListEnrollmentsSectionsResponses[keyof ListEnrollmentsSectionsResponses]; + +export type EnrollUserSectionsData = { + body: { + /** + * For an observer enrollment, the ID of a student to observe. The + * caller must have +manage_students+ permission in the course. + * This is a one-off operation; to automatically observe all a + * student's enrollments (for example, as a parent), please use + * the {api:UserObserveesController#create User Observees API}. + */ + 'enrollment[associated_user_id]'?: number; + /** + * The ID of the course section to enroll the student in. If the + * section-specific URL is used, this argument is redundant and will be + * ignored. + */ + 'enrollment[course_section_id]'?: number; + /** + * If set to 'active,' student will be immediately enrolled in the course. + * Otherwise they will be required to accept a course invitation. Default is + * 'invited.'. + * + * If set to 'inactive', student will be listed in the course roster for + * teachers, but will not be able to participate in the course until + * their enrollment is activated. + */ + 'enrollment[enrollment_state]'?: 'active' | 'invited' | 'inactive'; + /** + * If set, the enrollment will only allow the user to see and interact with + * users enrolled in the section given by course_section_id. + * * For teachers and TAs, this includes grading privileges. + * * Section-limited students will not see any users (including teachers + * and TAs) not enrolled in their sections. + * * Users may have other enrollments that grant privileges to + * multiple sections in the same course. + */ + 'enrollment[limit_privileges_to_course_section]'?: boolean; + /** + * If true, a notification will be sent to the enrolled user. + * Notifications are not sent by default. + */ + 'enrollment[notify]'?: boolean; + /** + * Assigns a custom course-level role to the user. + */ + 'enrollment[role]'?: unknown; + /** + * Assigns a custom course-level role to the user. + */ + 'enrollment[role_id]'?: number; + /** + * If true, marks the enrollment as a self-enrollment, which gives + * students the ability to drop the course if desired. Defaults to false. + */ + 'enrollment[self_enrolled]'?: boolean; + /** + * If the current user is not allowed to manage enrollments in this + * course, but the course allows self-enrollment, the user can self- + * enroll as a student in the default section by passing in a valid + * code. When self-enrolling, the user_id must be 'self'. The + * enrollment_state will be set to 'active' and all other arguments + * will be ignored. + */ + 'enrollment[self_enrollment_code]'?: string; + /** + * Enroll the user as a student, teacher, TA, observer, or designer. If no + * value is given, the type will be inferred by enrollment[role] if supplied, + * otherwise 'StudentEnrollment' will be used. + */ + 'enrollment[type]': 'StudentEnrollment' | 'TeacherEnrollment' | 'TaEnrollment' | 'ObserverEnrollment' | 'DesignerEnrollment'; + /** + * The ID of the user to be enrolled in the course. + */ + 'enrollment[user_id]': string; + }; + path: { + /** + * ID + */ + section_id: string; + }; + query?: never; + url: '/v1/sections/{section_id}/enrollments'; +}; + +export type EnrollUserSectionsResponses = { + /** + * No response was specified + */ + 200: Enrollment; +}; + +export type EnrollUserSectionsResponse = EnrollUserSectionsResponses[keyof EnrollUserSectionsResponses]; + +export type ListSubmissionsForMultipleAssignmentsSectionsData = { + body?: never; + path: { + /** + * ID + */ + section_id: string; + }; + query?: { + /** + * List of student ids to return submissions for. If this argument is + * omitted, return submissions for the calling user. Students may only list + * their own submissions. Observers may only list those of associated + * students. The special id "all" will return submissions for all students + * in the course/section as appropriate. + */ + student_ids?: Array; + /** + * List of assignments to return submissions for. If none are given, + * submissions for all assignments are returned. + */ + assignment_ids?: Array; + /** + * If this argument is present, the response will be grouped by student, + * rather than a flat array of submissions. + */ + grouped?: boolean; + /** + * If this argument is set to true, the response will only include + * submissions for assignments that have the post_to_sis flag set to true and + * user enrollments that were added through sis. + */ + post_to_sis?: boolean; + /** + * If this argument is set, the response will only include submissions that + * were submitted after the specified date_time. This will exclude + * submissions that do not have a submitted_at which will exclude unsubmitted + * submissions. + * The value must be formatted as ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + */ + submitted_since?: string; + /** + * If this argument is set, the response will only include submissions that + * were graded after the specified date_time. This will exclude + * submissions that have not been graded. + * The value must be formatted as ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + */ + graded_since?: string; + /** + * The id of the grading period in which submissions are being requested + * (Requires grading periods to exist on the account) + */ + grading_period_id?: number; + /** + * The current status of the submission + */ + workflow_state?: 'submitted' | 'unsubmitted' | 'graded' | 'pending_review'; + /** + * The current state of the enrollments. If omitted will include all + * enrollments that are not deleted. + */ + enrollment_state?: 'active' | 'concluded'; + /** + * If omitted it is set to true. When set to false it will ignore the effective + * state of the student enrollments and use the workflow_state for the + * enrollments. The argument is ignored unless enrollment_state argument is + * also passed. + */ + state_based_on_date?: boolean; + /** + * The order submissions will be returned in. Defaults to "id". Doesn't + * affect results for "grouped" mode. + */ + order?: 'id' | 'graded_at'; + /** + * Determines whether ordered results are returned in ascending or descending + * order. Defaults to "ascending". Doesn't affect results for "grouped" mode. + */ + order_direction?: 'ascending' | 'descending'; + /** + * Associations to include with the group. `total_scores` requires the + * `grouped` argument. + */ + include?: 'submission_history' | 'submission_comments' | 'rubric_assessment' | 'assignment' | 'total_scores' | 'visibility' | 'course' | 'user'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/sections/{section_id}/students/submissions'; +}; + +export type ListSubmissionsForMultipleAssignmentsSectionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GradeOrCommentOnMultipleSubmissionsSectionsSubmissionsData = { + body?: { + /** + * Specifies which assignment to grade. This argument is not necessary when + * using the assignment-specific endpoints. + */ + 'grade_data[student_id][assignment_id]'?: number; + /** + * See documentation for the excuse argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][excuse]'?: boolean; + /** + * See documentation for the comment[] arguments in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][file_ids]'?: Array; + /** + * no description + */ + 'grade_data[student_id][group_comment]'?: boolean; + /** + * no description + */ + 'grade_data[student_id][media_comment_id]'?: string; + /** + * no description + */ + 'grade_data[student_id][media_comment_type]'?: 'audio' | 'video'; + /** + * See documentation for the posted_grade argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][posted_grade]'?: string; + /** + * See documentation for the rubric_assessment argument in the + * {api:SubmissionsApiController#update Submissions Update} documentation + */ + 'grade_data[student_id][rubric_assessment]'?: unknown; + /** + * no description + */ + 'grade_data[student_id][text_comment]'?: string; + }; + path: { + /** + * ID + */ + section_id: string; + }; + query?: never; + url: '/v1/sections/{section_id}/submissions/update_grades'; +}; + +export type GradeOrCommentOnMultipleSubmissionsSectionsSubmissionsResponses = { + /** + * No response was specified + */ + 200: Progress; +}; + +export type GradeOrCommentOnMultipleSubmissionsSectionsSubmissionsResponse = GradeOrCommentOnMultipleSubmissionsSectionsSubmissionsResponses[keyof GradeOrCommentOnMultipleSubmissionsSectionsSubmissionsResponses]; + +export type GetKalturaConfigData = { + body?: never; + path?: never; + query?: never; + url: '/v1/services/kaltura'; +}; + +export type GetKalturaConfigResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type StartKalturaSessionData = { + body?: never; + path?: never; + query?: never; + url: '/v1/services/kaltura_session'; +}; + +export type StartKalturaSessionResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UnShareBrandconfigThemeData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/shared_brand_configs/{id}'; +}; + +export type UnShareBrandconfigThemeResponses = { + /** + * No response was specified + */ + 200: SharedBrandConfig; +}; + +export type UnShareBrandconfigThemeResponse = UnShareBrandconfigThemeResponses[keyof UnShareBrandconfigThemeResponses]; + +export type ListActivityStreamActivityStreamData = { + body?: never; + path?: never; + query?: { + /** + * If true, will only return objects for courses the user is actively participating in + */ + only_active_courses?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/activity_stream'; +}; + +export type ListActivityStreamActivityStreamResponses = { + /** + * Returns the current user's global activity stream, paginated. + */ + 200: Array; +}; + +export type ListActivityStreamActivityStreamResponse = ListActivityStreamActivityStreamResponses[keyof ListActivityStreamActivityStreamResponses]; + +export type HideAllStreamItemsData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/activity_stream'; +}; + +export type HideAllStreamItemsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListActivityStreamSelfData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/activity_stream'; +}; + +export type ListActivityStreamSelfResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ActivityStreamSummaryData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/activity_stream/summary'; +}; + +export type ActivityStreamSummaryResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type HideStreamItemData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/self/activity_stream/{id}'; +}; + +export type HideStreamItemResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListBookmarksData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/bookmarks'; +}; + +export type ListBookmarksResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListBookmarksResponse = ListBookmarksResponses[keyof ListBookmarksResponses]; + +export type CreateBookmarkData = { + body?: { + /** + * The data associated with the bookmark + */ + data?: string; + /** + * The name of the bookmark + */ + name?: string; + /** + * The position of the bookmark. Defaults to the bottom. + */ + position?: number; + /** + * The url of the bookmark + */ + url?: string; + }; + path?: never; + query?: never; + url: '/v1/users/self/bookmarks'; +}; + +export type CreateBookmarkResponses = { + /** + * No response was specified + */ + 200: Bookmark; +}; + +export type CreateBookmarkResponse = CreateBookmarkResponses[keyof CreateBookmarkResponses]; + +export type DeleteBookmarkData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/self/bookmarks/{id}'; +}; + +export type DeleteBookmarkResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetBookmarkData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/self/bookmarks/{id}'; +}; + +export type GetBookmarkResponses = { + /** + * No response was specified + */ + 200: Bookmark; +}; + +export type GetBookmarkResponse = GetBookmarkResponses[keyof GetBookmarkResponses]; + +export type UpdateBookmarkData = { + body?: { + /** + * The data associated with the bookmark + */ + data?: string; + /** + * The name of the bookmark + */ + name?: string; + /** + * The position of the bookmark. Defaults to the bottom. + */ + position?: number; + /** + * The url of the bookmark + */ + url?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/self/bookmarks/{id}'; +}; + +export type UpdateBookmarkResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type UpdateBookmarkResponse = UpdateBookmarkResponses[keyof UpdateBookmarkResponses]; + +export type DeletePushNotificationEndpointData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/communication_channels/push'; +}; + +export type DeletePushNotificationEndpointResponses = { + /** + * No response was specified + */ + 200: SuccessTrue; +}; + +export type DeletePushNotificationEndpointResponse = DeletePushNotificationEndpointResponses[keyof DeletePushNotificationEndpointResponses]; + +export type UpdatePreferencesByCategoryData = { + body: { + /** + * The desired frequency for each notification in the category + */ + 'notification_preferences[frequency]': string; + }; + path: { + /** + * ID + */ + communication_channel_id: string; + /** + * The name of the category. Must be parameterized (e.g. The category "Course Content" should be "course_content") + */ + category: string; + }; + query?: never; + url: '/v1/users/self/communication_channels/{communication_channel_id}/notification_preference_categories/{category}'; +}; + +export type UpdatePreferencesByCategoryResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateMultiplePreferencesCommunicationChannelIdData = { + body: { + /** + * The desired frequency for notification + */ + 'notification_preferences[X][frequency]': string; + }; + path: { + /** + * ID + */ + communication_channel_id: string; + }; + query?: never; + url: '/v1/users/self/communication_channels/{communication_channel_id}/notification_preferences'; +}; + +export type UpdateMultiplePreferencesCommunicationChannelIdResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdatePreferenceCommunicationChannelIdData = { + body: { + /** + * The desired frequency for this notification + */ + 'notification_preferences[frequency]': string; + }; + path: { + /** + * ID + */ + communication_channel_id: string; + /** + * ID + */ + notification: string; + }; + query?: never; + url: '/v1/users/self/communication_channels/{communication_channel_id}/notification_preferences/{notification}'; +}; + +export type UpdatePreferenceCommunicationChannelIdResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateMultiplePreferencesTypeData = { + body: { + /** + * The desired frequency for notification + */ + 'notification_preferences[X][frequency]': string; + }; + path: { + /** + * ID + */ + type: string; + /** + * ID + */ + address: string; + }; + query?: never; + url: '/v1/users/self/communication_channels/{type}/{address}/notification_preferences'; +}; + +export type UpdateMultiplePreferencesTypeResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdatePreferenceTypeData = { + body: { + /** + * The desired frequency for this notification + */ + 'notification_preferences[frequency]': string; + }; + path: { + /** + * ID + */ + type: string; + /** + * ID + */ + address: string; + /** + * ID + */ + notification: string; + }; + query?: never; + url: '/v1/users/self/communication_channels/{type}/{address}/notification_preferences/{notification}'; +}; + +export type UpdatePreferenceTypeResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ClearCourseNicknamesData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/course_nicknames'; +}; + +export type ClearCourseNicknamesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListCourseNicknamesData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/course_nicknames'; +}; + +export type ListCourseNicknamesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListCourseNicknamesResponse = ListCourseNicknamesResponses[keyof ListCourseNicknamesResponses]; + +export type RemoveCourseNicknameData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/users/self/course_nicknames/{course_id}'; +}; + +export type RemoveCourseNicknameResponses = { + /** + * No response was specified + */ + 200: CourseNickname; +}; + +export type RemoveCourseNicknameResponse = RemoveCourseNicknameResponses[keyof RemoveCourseNicknameResponses]; + +export type GetCourseNicknameData = { + body?: never; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/users/self/course_nicknames/{course_id}'; +}; + +export type GetCourseNicknameResponses = { + /** + * No response was specified + */ + 200: CourseNickname; +}; + +export type GetCourseNicknameResponse = GetCourseNicknameResponses[keyof GetCourseNicknameResponses]; + +export type SetCourseNicknameData = { + body: { + /** + * The nickname to set. It must be non-empty and shorter than 60 characters. + */ + nickname: string; + }; + path: { + /** + * ID + */ + course_id: string; + }; + query?: never; + url: '/v1/users/self/course_nicknames/{course_id}'; +}; + +export type SetCourseNicknameResponses = { + /** + * No response was specified + */ + 200: CourseNickname; +}; + +export type SetCourseNicknameResponse = SetCourseNicknameResponses[keyof SetCourseNicknameResponses]; + +export type ResetCourseFavoritesData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/favorites/courses'; +}; + +export type ResetCourseFavoritesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListFavoriteCoursesData = { + body?: never; + path?: never; + query?: { + /** + * When set, only return courses that are not configured as blueprint courses. + */ + exclude_blueprint_courses?: boolean; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/self/favorites/courses'; +}; + +export type ListFavoriteCoursesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListFavoriteCoursesResponse = ListFavoriteCoursesResponses[keyof ListFavoriteCoursesResponses]; + +export type RemoveCourseFromFavoritesData = { + body?: never; + path: { + /** + * the ID or SIS ID of the course to remove + */ + id: string; + }; + query?: never; + url: '/v1/users/self/favorites/courses/{id}'; +}; + +export type RemoveCourseFromFavoritesResponses = { + /** + * No response was specified + */ + 200: Favorite; +}; + +export type RemoveCourseFromFavoritesResponse = RemoveCourseFromFavoritesResponses[keyof RemoveCourseFromFavoritesResponses]; + +export type AddCourseToFavoritesData = { + body?: never; + path: { + /** + * The ID or SIS ID of the course to add. The current user must be + * registered in the course. + */ + id: string; + }; + query?: never; + url: '/v1/users/self/favorites/courses/{id}'; +}; + +export type AddCourseToFavoritesResponses = { + /** + * No response was specified + */ + 200: Favorite; +}; + +export type AddCourseToFavoritesResponse = AddCourseToFavoritesResponses[keyof AddCourseToFavoritesResponses]; + +export type ResetGroupFavoritesData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/favorites/groups'; +}; + +export type ResetGroupFavoritesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListFavoriteGroupsData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/favorites/groups'; +}; + +export type ListFavoriteGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListFavoriteGroupsResponse = ListFavoriteGroupsResponses[keyof ListFavoriteGroupsResponses]; + +export type RemoveGroupFromFavoritesData = { + body?: never; + path: { + /** + * the ID or SIS ID of the group to remove + */ + id: string; + }; + query?: never; + url: '/v1/users/self/favorites/groups/{id}'; +}; + +export type RemoveGroupFromFavoritesResponses = { + /** + * No response was specified + */ + 200: Favorite; +}; + +export type RemoveGroupFromFavoritesResponse = RemoveGroupFromFavoritesResponses[keyof RemoveGroupFromFavoritesResponses]; + +export type AddGroupToFavoritesData = { + body?: never; + path: { + /** + * The ID or SIS ID of the group to add. The current user must be + * a member of the group. + */ + id: string; + }; + query?: never; + url: '/v1/users/self/favorites/groups/{id}'; +}; + +export type AddGroupToFavoritesResponses = { + /** + * No response was specified + */ + 200: Favorite; +}; + +export type AddGroupToFavoritesResponse = AddGroupToFavoritesResponses[keyof AddGroupToFavoritesResponses]; + +export type ListYourGroupsData = { + body?: never; + path?: never; + query?: { + /** + * Only include groups that are in this type of context. + */ + context_type?: 'Account' | 'Course'; + /** + * - "tabs": Include the list of tabs configured for each group. See the + * {api:TabsController#index List available tabs API} for more information. + */ + include?: 'tabs'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/self/groups'; +}; + +export type ListYourGroupsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListYourGroupsResponse = ListYourGroupsResponses[keyof ListYourGroupsResponses]; + +export type GetPandataEventsJwtTokenAndItsExpirationDateData = { + body?: { + /** + * The pandata events appKey for this mobile app + */ + app_key?: string; + }; + path?: never; + query?: never; + url: '/v1/users/self/pandata_events_token'; +}; + +export type GetPandataEventsJwtTokenAndItsExpirationDateResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListTodoItemsData = { + body?: never; + path?: never; + query?: { + /** + * "ungraded_quizzes":: Optionally include ungraded quizzes (such as practice quizzes and surveys) in the list. + * These will be returned under a +quiz+ key instead of an +assignment+ key in response elements. + */ + include?: 'ungraded_quizzes'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/self/todo'; +}; + +export type ListTodoItemsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListCountsForTodoItemsData = { + body?: never; + path?: never; + query?: { + /** + * "ungraded_quizzes":: Optionally include ungraded quizzes (such as practice quizzes and surveys) in the list. + * These will be returned under a +quiz+ key instead of an +assignment+ key in response elements. + */ + include?: 'ungraded_quizzes'; + }; + url: '/v1/users/self/todo_item_count'; +}; + +export type ListCountsForTodoItemsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListUpcomingAssignmentsCalendarEventsData = { + body?: never; + path?: never; + query?: never; + url: '/v1/users/self/upcoming_events'; +}; + +export type ListUpcomingAssignmentsCalendarEventsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ShowUserDetailsData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{id}'; +}; + +export type ShowUserDetailsResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type ShowUserDetailsResponse = ShowUserDetailsResponses[keyof ShowUserDetailsResponses]; + +export type EditUserData = { + body?: { + /** + * A unique representation of the avatar record to assign as the user's + * current avatar. This token can be obtained from the user avatars endpoint. + * This supersedes the user [avatar] [url] argument, and if both are included + * the url will be ignored. Note: this is an internal representation and is + * subject to change without notice. It should be consumed with this api + * endpoint and used in the user update endpoint, and should not be + * constructed by the client. + */ + 'user[avatar][token]'?: string; + /** + * To set the user's avatar to point to an external url, do not include a + * token and instead pass the url here. Warning: For maximum compatibility, + * please use 128 px square images. + */ + 'user[avatar][url]'?: string; + /** + * The default email address of the user. + */ + 'user[email]'?: string; + /** + * The user's preferred language, from the list of languages Canvas supports. + * This is in RFC-5646 format. + */ + 'user[locale]'?: string; + /** + * The full name of the user. This name will be used by teacher for grading. + */ + 'user[name]'?: string; + /** + * User's name as it will be displayed in discussions, messages, and comments. + */ + 'user[short_name]'?: string; + /** + * User's name as used to sort alphabetically in lists. + */ + 'user[sortable_name]'?: string; + /** + * The time zone for the user. Allowed time zones are + * {http://www.iana.org/time-zones IANA time zones} or friendlier + * {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}. + */ + 'user[time_zone]'?: string; + }; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{id}'; +}; + +export type EditUserResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type EditUserResponse = EditUserResponses[keyof EditUserResponses]; + +export type GetCustomColorsData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{id}/colors'; +}; + +export type GetCustomColorsResponses = { + /** + * No response was specified + */ + 200: CustomColors; +}; + +export type GetCustomColorsResponse = GetCustomColorsResponses[keyof GetCustomColorsResponses]; + +export type GetCustomColorData = { + body?: never; + path: { + /** + * ID + */ + id: string; + /** + * ID + */ + asset_string: string; + }; + query?: never; + url: '/v1/users/{id}/colors/{asset_string}'; +}; + +export type GetCustomColorResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateCustomColorData = { + body?: { + /** + * The hexcode of the color to set for the context, if you choose to pass the + * hexcode as a query parameter rather than in the request body you should + * NOT include the '#' unless you escape it first. + */ + hexcode?: string; + }; + path: { + /** + * ID + */ + id: string; + /** + * ID + */ + asset_string: string; + }; + query?: never; + url: '/v1/users/{id}/colors/{asset_string}'; +}; + +export type UpdateCustomColorResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetDashboardPositionsData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{id}/dashboard_positions'; +}; + +export type GetDashboardPositionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type UpdateDashboardPositionsData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{id}/dashboard_positions'; +}; + +export type UpdateDashboardPositionsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type MergeUserIntoAnotherUserAccountsData = { + body?: never; + path: { + /** + * ID + */ + id: string; + /** + * ID + */ + destination_account_id: string; + /** + * ID + */ + destination_user_id: string; + }; + query?: never; + url: '/v1/users/{id}/merge_into/accounts/{destination_account_id}/users/{destination_user_id}'; +}; + +export type MergeUserIntoAnotherUserAccountsResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type MergeUserIntoAnotherUserAccountsResponse = MergeUserIntoAnotherUserAccountsResponses[keyof MergeUserIntoAnotherUserAccountsResponses]; + +export type MergeUserIntoAnotherUserDestinationUserIdData = { + body?: never; + path: { + /** + * ID + */ + id: string; + /** + * ID + */ + destination_user_id: string; + }; + query?: never; + url: '/v1/users/{id}/merge_into/{destination_user_id}'; +}; + +export type MergeUserIntoAnotherUserDestinationUserIdResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type MergeUserIntoAnotherUserDestinationUserIdResponse = MergeUserIntoAnotherUserDestinationUserIdResponses[keyof MergeUserIntoAnotherUserDestinationUserIdResponses]; + +export type UpdateUserSettingsData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: { + /** + * If true, require user to manually mark discussion posts as read (don't + * auto-mark as read). + */ + manual_mark_as_read?: boolean; + /** + * If true, the user's page loads with the global navigation collapsed + */ + collapse_global_nav?: boolean; + }; + url: '/v1/users/{id}/settings'; +}; + +export type UpdateUserSettingsResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SplitMergedUsersIntoSeparateUsersData = { + body?: never; + path: { + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{id}/split'; +}; + +export type SplitMergedUsersIntoSeparateUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type SplitMergedUsersIntoSeparateUsersResponse = SplitMergedUsersIntoSeparateUsersResponses[keyof SplitMergedUsersIntoSeparateUsersResponses]; + +export type ListAvatarOptionsData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/avatars'; +}; + +export type ListAvatarOptionsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAvatarOptionsResponse = ListAvatarOptionsResponses[keyof ListAvatarOptionsResponses]; + +export type ListCalendarEventsForUserData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * Defaults to "event" + */ + type?: 'event' | 'assignment'; + /** + * Only return events since the start_date (inclusive). + * Defaults to today. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + */ + start_date?: string; + /** + * Only return events before the end_date (inclusive). + * Defaults to start_date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. + * If end_date is the same as start_date, then only events on that day are + * returned. + */ + end_date?: string; + /** + * Defaults to false (dated events only). + * If true, only return undated events and ignore start_date and end_date. + */ + undated?: boolean; + /** + * Defaults to false (uses start_date, end_date, and undated criteria). + * If true, all events are returned, ignoring start_date, end_date, and undated criteria. + */ + all_events?: boolean; + /** + * List of context codes of courses/groups/users whose events you want to see. + * If not specified, defaults to the current user (i.e personal calendar, + * no course/group events). Limited to 10 context codes, additional ones are + * ignored. The format of this field is the context type, followed by an + * underscore, followed by the context id. For example: course_42 + */ + context_codes?: Array; + /** + * Array of attributes to exclude. Possible values are "description", "child_events" and "assignment" + */ + excludes?: Array>; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/calendar_events'; +}; + +export type ListCalendarEventsForUserResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListCalendarEventsForUserResponse = ListCalendarEventsForUserResponses[keyof ListCalendarEventsForUserResponses]; + +export type ListUserCommunicationChannelsData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/communication_channels'; +}; + +export type ListUserCommunicationChannelsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListUserCommunicationChannelsResponse = ListUserCommunicationChannelsResponses[keyof ListUserCommunicationChannelsResponses]; + +export type CreateCommunicationChannelData = { + body: { + /** + * An email address or SMS number. Not required for "push" type channels. + */ + 'communication_channel[address]': string; + /** + * A registration id, device token, or equivalent token given to an app when + * registering with a push notification provider. Only valid for "push" type channels. + */ + 'communication_channel[token]'?: string; + /** + * The type of communication channel. + * + * In order to enable push notification support, the server must be + * properly configured (via sns.yml) to communicate with Amazon + * Simple Notification Services, and the developer key used to create + * the access token from this request must have an SNS ARN configured on + * it. + */ + 'communication_channel[type]': 'email' | 'sms' | 'push'; + /** + * Only valid for site admins and account admins making requests; If true, the channel is + * automatically validated and no confirmation email or SMS is sent. + * Otherwise, the user must respond to a confirmation message to confirm the + * channel. + */ + skip_confirmation?: boolean; + }; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/communication_channels'; +}; + +export type CreateCommunicationChannelResponses = { + /** + * No response was specified + */ + 200: CommunicationChannel; +}; + +export type CreateCommunicationChannelResponse = CreateCommunicationChannelResponses[keyof CreateCommunicationChannelResponses]; + +export type ListOfPreferenceCategoriesData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + communication_channel_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/communication_channels/{communication_channel_id}/notification_preference_categories'; +}; + +export type ListOfPreferenceCategoriesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListPreferencesCommunicationChannelIdData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + communication_channel_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/communication_channels/{communication_channel_id}/notification_preferences'; +}; + +export type ListPreferencesCommunicationChannelIdResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListPreferencesCommunicationChannelIdResponse = ListPreferencesCommunicationChannelIdResponses[keyof ListPreferencesCommunicationChannelIdResponses]; + +export type GetPreferenceCommunicationChannelIdData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + communication_channel_id: string; + /** + * ID + */ + notification: string; + }; + query?: never; + url: '/v1/users/{user_id}/communication_channels/{communication_channel_id}/notification_preferences/{notification}'; +}; + +export type GetPreferenceCommunicationChannelIdResponses = { + /** + * No response was specified + */ + 200: NotificationPreference; +}; + +export type GetPreferenceCommunicationChannelIdResponse = GetPreferenceCommunicationChannelIdResponses[keyof GetPreferenceCommunicationChannelIdResponses]; + +export type DeleteCommunicationChannelIdData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{user_id}/communication_channels/{id}'; +}; + +export type DeleteCommunicationChannelIdResponses = { + /** + * No response was specified + */ + 200: CommunicationChannel; +}; + +export type DeleteCommunicationChannelIdResponse = DeleteCommunicationChannelIdResponses[keyof DeleteCommunicationChannelIdResponses]; + +export type DeleteCommunicationChannelTypeData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + type: string; + /** + * ID + */ + address: string; + }; + query?: never; + url: '/v1/users/{user_id}/communication_channels/{type}/{address}'; +}; + +export type DeleteCommunicationChannelTypeResponses = { + /** + * No response was specified + */ + 200: CommunicationChannel; +}; + +export type DeleteCommunicationChannelTypeResponse = DeleteCommunicationChannelTypeResponses[keyof DeleteCommunicationChannelTypeResponses]; + +export type ListPreferencesTypeData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + type: string; + /** + * ID + */ + address: string; + }; + query?: never; + url: '/v1/users/{user_id}/communication_channels/{type}/{address}/notification_preferences'; +}; + +export type ListPreferencesTypeResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListPreferencesTypeResponse = ListPreferencesTypeResponses[keyof ListPreferencesTypeResponses]; + +export type GetPreferenceTypeData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + type: string; + /** + * ID + */ + address: string; + /** + * ID + */ + notification: string; + }; + query?: never; + url: '/v1/users/{user_id}/communication_channels/{type}/{address}/notification_preferences/{notification}'; +}; + +export type GetPreferenceTypeResponses = { + /** + * No response was specified + */ + 200: NotificationPreference; +}; + +export type GetPreferenceTypeResponse = GetPreferenceTypeResponses[keyof GetPreferenceTypeResponses]; + +export type ListContentExportsUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/content_exports'; +}; + +export type ListContentExportsUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListContentExportsUsersResponse = ListContentExportsUsersResponses[keyof ListContentExportsUsersResponses]; + +export type ExportContentUsersData = { + body: { + /** + * "common_cartridge":: Export the contents of the course in the Common Cartridge (.imscc) format + * "qti":: Export quizzes from a course in the QTI format + * "zip":: Export files from a course, group, or user in a zip file + */ + export_type: 'common_cartridge' | 'qti' | 'zip'; + /** + * The select parameter allows exporting specific data. The keys are object types like 'files', + * 'folders', 'pages', etc. The value for each key is a list of object ids. An id can be an + * integer or a string. + * + * Multiple object types can be selected in the same call. However, not all object types are + * valid for every export_type. Common Cartridge supports all object types. Zip and QTI only + * support the object types as described below. + * + * "folders":: Also supported for zip export_type. + * "files":: Also supported for zip export_type. + * "quizzes":: Also supported for qti export_type. + */ + select?: 'folders' | 'files' | 'attachments' | 'quizzes' | 'assignments' | 'announcements' | 'calendar_events' | 'discussion_topics' | 'modules' | 'module_items' | 'pages' | 'rubrics'; + /** + * Don't send the notifications about the export to the user. Default: false + */ + skip_notifications?: boolean; + }; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/content_exports'; +}; + +export type ExportContentUsersResponses = { + /** + * No response was specified + */ + 200: ContentExport; +}; + +export type ExportContentUsersResponse = ExportContentUsersResponses[keyof ExportContentUsersResponses]; + +export type ShowContentExportUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{user_id}/content_exports/{id}'; +}; + +export type ShowContentExportUsersResponses = { + /** + * No response was specified + */ + 200: ContentExport; +}; + +export type ShowContentExportUsersResponse = ShowContentExportUsersResponses[keyof ShowContentExportUsersResponses]; + +export type ListLicensesUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/content_licenses'; +}; + +export type ListLicensesUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListLicensesUsersResponse = ListLicensesUsersResponses[keyof ListLicensesUsersResponses]; + +export type ListContentMigrationsUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/content_migrations'; +}; + +export type ListContentMigrationsUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListContentMigrationsUsersResponse = ListContentMigrationsUsersResponses[keyof ListContentMigrationsUsersResponses]; + +export type CreateContentMigrationUsersData = { + body: { + /** + * Move anything scheduled for day 'X' to the specified day. (0-Sunday, + * 1-Monday, 2-Tuesday, 3-Wednesday, 4-Thursday, 5-Friday, 6-Saturday) + */ + 'date_shift_options[day_substitutions][X]'?: number; + /** + * The new end date for the source content/course + */ + 'date_shift_options[new_end_date]'?: string; + /** + * The new start date for the content/course + */ + 'date_shift_options[new_start_date]'?: string; + /** + * The original end date of the source content/course + */ + 'date_shift_options[old_end_date]'?: string; + /** + * The original start date of the source content/course + */ + 'date_shift_options[old_start_date]'?: string; + /** + * Whether to remove dates in the copied course. Cannot be used + * in conjunction with *shift_dates*. + */ + 'date_shift_options[remove_dates]'?: boolean; + /** + * Whether to shift dates in the copied course + */ + 'date_shift_options[shift_dates]'?: boolean; + /** + * The type of the migration. Use the + * {api:ContentMigrationsController#available_migrators Migrator} endpoint to + * see all available migrators. Default allowed values: + * canvas_cartridge_importer, common_cartridge_importer, + * course_copy_importer, zip_file_importer, qti_converter, moodle_converter + */ + migration_type: string; + /** + * Required if uploading a file. This is the first step in uploading a file + * to the content migration. See the {file:file_uploads.html File Upload + * Documentation} for details on the file upload workflow. + */ + 'pre_attachment[name]'?: string; + /** + * Other file upload properties, See {file:file_uploads.html File Upload + * Documentation} + */ + 'pre_attachment[todo]'?: string; + /** + * A URL to download the file from. Must not require authentication. + */ + 'settings[file_url]'?: string; + /** + * The folder to unzip the .zip file into for a zip_file_import. + */ + 'settings[folder_id]'?: string; + /** + * Whether to overwrite quizzes with the same identifiers between content + * packages. + */ + 'settings[overwrite_quizzes]'?: boolean; + /** + * The existing question bank ID to import questions into if not specified in + * the content package. + */ + 'settings[question_bank_id]'?: number; + /** + * The question bank to import questions into if not specified in the content + * package, if both bank id and name are set, id will take precedence. + */ + 'settings[question_bank_name]'?: string; + /** + * The course to copy from for a course copy migration. (required if doing + * course copy) + */ + 'settings[source_course_id]'?: string; + }; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/content_migrations'; +}; + +export type CreateContentMigrationUsersResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type CreateContentMigrationUsersResponse = CreateContentMigrationUsersResponses[keyof CreateContentMigrationUsersResponses]; + +export type ListMigrationSystemsUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/content_migrations/migrators'; +}; + +export type ListMigrationSystemsUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListMigrationSystemsUsersResponse = ListMigrationSystemsUsersResponses[keyof ListMigrationSystemsUsersResponses]; + +export type ListMigrationIssuesUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + content_migration_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/content_migrations/{content_migration_id}/migration_issues'; +}; + +export type ListMigrationIssuesUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListMigrationIssuesUsersResponse = ListMigrationIssuesUsersResponses[keyof ListMigrationIssuesUsersResponses]; + +export type GetMigrationIssueUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + content_migration_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{user_id}/content_migrations/{content_migration_id}/migration_issues/{id}'; +}; + +export type GetMigrationIssueUsersResponses = { + /** + * No response was specified + */ + 200: MigrationIssue; +}; + +export type GetMigrationIssueUsersResponse = GetMigrationIssueUsersResponses[keyof GetMigrationIssueUsersResponses]; + +export type UpdateMigrationIssueUsersData = { + body: { + /** + * Set the workflow_state of the issue. + */ + workflow_state: 'active' | 'resolved'; + }; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + content_migration_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{user_id}/content_migrations/{content_migration_id}/migration_issues/{id}'; +}; + +export type UpdateMigrationIssueUsersResponses = { + /** + * No response was specified + */ + 200: MigrationIssue; +}; + +export type UpdateMigrationIssueUsersResponse = UpdateMigrationIssueUsersResponses[keyof UpdateMigrationIssueUsersResponses]; + +export type GetContentMigrationUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{user_id}/content_migrations/{id}'; +}; + +export type GetContentMigrationUsersResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type GetContentMigrationUsersResponse = GetContentMigrationUsersResponses[keyof GetContentMigrationUsersResponses]; + +export type UpdateContentMigrationUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{user_id}/content_migrations/{id}'; +}; + +export type UpdateContentMigrationUsersResponses = { + /** + * No response was specified + */ + 200: ContentMigration; +}; + +export type UpdateContentMigrationUsersResponse = UpdateContentMigrationUsersResponses[keyof UpdateContentMigrationUsersResponses]; + +export type ListCoursesForUserData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + /** + * - "needs_grading_count": Optional information to include with each Course. + * When needs_grading_count is given, and the current user has grading + * rights, the total number of submissions needing grading for all + * assignments is returned. + * - "syllabus_body": Optional information to include with each Course. + * When syllabus_body is given the user-generated html for the course + * syllabus is returned. + * - "public_description": Optional information to include with each Course. + * When public_description is given the user-generated text for the course + * public description is returned. + * - "total_scores": Optional information to include with each Course. + * When total_scores is given, any student enrollments will also + * include the fields 'computed_current_score', 'computed_final_score', + * 'computed_current_grade', and 'computed_final_grade' (see Enrollment + * documentation for more information on these fields). This argument + * is ignored if the course is configured to hide final grades. + * - "current_grading_period_scores": Optional information to include with + * each Course. When current_grading_period_scores is given and total_scores + * is given, any student enrollments will also include the fields + * 'has_grading_periods', + * 'totals_for_all_grading_periods_option', 'current_grading_period_title', + * 'current_grading_period_id', current_period_computed_current_score', + * 'current_period_computed_final_score', + * 'current_period_computed_current_grade', and + * 'current_period_computed_final_grade', as well as (if the user has permission) + * 'current_period_unposted_current_score', + * 'current_period_unposted_final_score', + * 'current_period_unposted_current_grade', and + * 'current_period_unposted_final_grade' (see Enrollment documentation for + * more information on these fields). In addition, when this argument is + * passed, the course will have a 'has_grading_periods' attribute + * on it. This argument is ignored if the course is configured to hide final + * grades or if the total_scores argument is not included. + * - "term": Optional information to include with each Course. When + * term is given, the information for the enrollment term for each course + * is returned. + * - "account": Optional information to include with each Course. When + * account is given, the account json for each course is returned. + * - "course_progress": Optional information to include with each Course. + * When course_progress is given, each course will include a + * 'course_progress' object with the fields: 'requirement_count', an integer + * specifying the total number of requirements in the course, + * 'requirement_completed_count', an integer specifying the total number of + * requirements in this course that have been completed, and + * 'next_requirement_url', a string url to the next requirement item, and + * 'completed_at', the date the course was completed (null if incomplete). + * 'next_requirement_url' will be null if all requirements have been + * completed or the current module does not require sequential progress. + * "course_progress" will return an error message if the course is not + * module based or the user is not enrolled as a student in the course. + * - "sections": Section enrollment information to include with each Course. + * Returns an array of hashes containing the section ID (id), section name + * (name), start and end dates (start_at, end_at), as well as the enrollment + * type (enrollment_role, e.g. 'StudentEnrollment'). + * - "storage_quota_used_mb": The amount of storage space used by the files in this course + * - "total_students": Optional information to include with each Course. + * Returns an integer for the total amount of active and invited students. + * - "passback_status": Include the grade passback_status + * - "favorites": Optional information to include with each Course. + * Indicates if the user has marked the course as a favorite course. + * - "teachers": Teacher information to include with each Course. + * Returns an array of hashes containing the {api:Users:UserDisplay UserDisplay} information + * for each teacher in the course. + * - "observed_users": Optional information to include with each Course. + * Will include data for observed users if the current user has an + * observer enrollment. + * - "tabs": Optional information to include with each Course. + * Will include the list of tabs configured for each course. See the + * {api:TabsController#index List available tabs API} for more information. + * - "course_image": Optional course image data for when there is a course image + * and the course image feature flag has been enabled + */ + include?: 'needs_grading_count' | 'syllabus_body' | 'public_description' | 'total_scores' | 'current_grading_period_scores' | 'term' | 'account' | 'course_progress' | 'sections' | 'storage_quota_used_mb' | 'total_students' | 'passback_status' | 'favorites' | 'teachers' | 'observed_users' | 'course_image'; + /** + * If set, only return courses that are in the given state(s). + * By default, "available" is returned for students and observers, and + * anything except "deleted", for all other enrollment types + */ + state?: 'unpublished' | 'available' | 'completed' | 'deleted'; + /** + * When set, only return courses where the user has an enrollment with the given state. + * This will respect section/course/term date overrides. + */ + enrollment_state?: 'active' | 'invited_or_pending' | 'completed'; + }; + url: '/v1/users/{user_id}/courses'; +}; + +export type ListCoursesForUserResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListCoursesForUserResponse = ListCoursesForUserResponses[keyof ListCoursesForUserResponses]; + +export type ListAssignmentsForUserData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + course_id: string; + }; + query?: { + /** + * Associations to include with the assignment. The "assignment_visibility" option + * requires that the Differentiated Assignments course feature be turned on. If + * "observed_users" is passed, submissions for observed users will also be included as an array. + */ + include?: 'submission' | 'assignment_visibility' | 'all_dates' | 'overrides' | 'observed_users'; + /** + * The partial title of the assignments to match and return. + */ + search_term?: string; + /** + * Apply assignment overrides for each assignment, defaults to true. + */ + override_assignment_dates?: boolean; + /** + * Split up "needs_grading_count" by sections into the "needs_grading_count_by_section" key, defaults to false + */ + needs_grading_count_by_section?: boolean; + /** + * If included, only return certain assignments depending on due date and submission status. + */ + bucket?: 'past' | 'overdue' | 'undated' | 'ungraded' | 'unsubmitted' | 'upcoming' | 'future'; + /** + * if set, return only assignments specified + */ + assignment_ids?: Array; + /** + * Determines the order of the assignments. Defaults to "position". + */ + order_by?: 'position' | 'name'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/courses/{course_id}/assignments'; +}; + +export type ListAssignmentsForUserResponses = { + /** + * The assignments of a user. + */ + 200: Array; +}; + +export type ListAssignmentsForUserResponse = ListAssignmentsForUserResponses[keyof ListAssignmentsForUserResponses]; + +export type DeleteCustomDataData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query: { + /** + * The namespace from which to delete the data. This should be something other + * Canvas API apps aren't likely to use, such as a reverse DNS for your organization. + */ + ns: string; + }; + url: '/v1/users/{user_id}/custom_data'; +}; + +export type DeleteCustomDataResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type LoadCustomDataData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query: { + /** + * The namespace from which to retrieve the data. This should be something other + * Canvas API apps aren't likely to use, such as a reverse DNS for your organization. + */ + ns: string; + }; + url: '/v1/users/{user_id}/custom_data'; +}; + +export type LoadCustomDataResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type StoreCustomDataData = { + body: { + /** + * The data you want to store for the user, at the specified scope. If the data is + * composed of (possibly nested) JSON objects, scopes will be generated for the (nested) + * keys (see examples). + */ + data: unknown; + /** + * The namespace under which to store the data. This should be something other + * Canvas API apps aren't likely to use, such as a reverse DNS for your organization. + */ + ns: string; + }; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/custom_data'; +}; + +export type StoreCustomDataResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListEnrollmentsUsersData = { + body?: never; + path: { + /** + * Filter by user_id (only valid for course or section enrollment queries). If set to the current user's id, this is a way to determine if the user has any enrollments in the course or section, independent of whether the user has permission to view other people on the roster. + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + /** + * A list of enrollment types to return. Accepted values are 'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment', 'DesignerEnrollment', and 'ObserverEnrollment.' If omitted, all enrollment types are returned. This argument is ignored if `role` is given. + */ + type?: Array; + /** + * A list of enrollment roles to return. Accepted values include course-level roles created by the {api:RoleOverridesController#add_role Add Role API} as well as the base enrollment types accepted by the `type` argument above. + */ + role?: Array; + /** + * Filter by enrollment state. If omitted, 'active' and 'invited' enrollments are returned. When querying a user's enrollments (either via user_id argument or via user enrollments endpoint), the following additional synthetic states are supported: "current_and_invited"|"current_and_future"|"current_and_concluded" + */ + state?: 'active' | 'invited' | 'creation_pending' | 'deleted' | 'rejected' | 'completed' | 'inactive'; + /** + * Array of additional information to include on the enrollment or user records. "avatar_url" and "group_ids" will be returned on the user record. + */ + include?: 'avatar_url' | 'group_ids' | 'locked' | 'observed_users' | 'can_be_removed'; + /** + * Return grades for the given grading_period. If this parameter is not specified, the returned grades will be for the whole course. + */ + grading_period_id?: number; + /** + * Returns only enrollments for the specified enrollment term. This parameter only applies to the user enrollments path. May pass the ID from the enrollment terms api or the SIS id prepended with 'sis_term_id:'. + */ + enrollment_term_id?: number; + /** + * Returns only enrollments for the specified SIS account ID(s). Does not look into sub_accounts. May pass in array or string. + */ + sis_account_id?: Array; + /** + * Returns only enrollments matching the specified SIS course ID(s). + * May pass in array or string. + */ + sis_course_id?: Array; + /** + * Returns only section enrollments matching the specified SIS section ID(s). + * May pass in array or string. + */ + sis_section_id?: Array; + /** + * Returns only enrollments for the specified SIS user ID(s). May pass in + * array or string. + */ + sis_user_id?: Array; + }; + url: '/v1/users/{user_id}/enrollments'; +}; + +export type ListEnrollmentsUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListEnrollmentsUsersResponse = ListEnrollmentsUsersResponses[keyof ListEnrollmentsUsersResponses]; + +export type ListFeaturesUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/features'; +}; + +export type ListFeaturesUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListFeaturesUsersResponse = ListFeaturesUsersResponses[keyof ListFeaturesUsersResponses]; + +export type ListEnabledFeaturesUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/features/enabled'; +}; + +export type ListEnabledFeaturesUsersResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type RemoveFeatureFlagUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + feature: string; + }; + query?: never; + url: '/v1/users/{user_id}/features/flags/{feature}'; +}; + +export type RemoveFeatureFlagUsersResponses = { + /** + * No response was specified + */ + 200: FeatureFlag; +}; + +export type RemoveFeatureFlagUsersResponse = RemoveFeatureFlagUsersResponses[keyof RemoveFeatureFlagUsersResponses]; + +export type GetFeatureFlagUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + feature: string; + }; + query?: never; + url: '/v1/users/{user_id}/features/flags/{feature}'; +}; + +export type GetFeatureFlagUsersResponses = { + /** + * No response was specified + */ + 200: FeatureFlag; +}; + +export type GetFeatureFlagUsersResponse = GetFeatureFlagUsersResponses[keyof GetFeatureFlagUsersResponses]; + +export type SetFeatureFlagUsersData = { + body?: { + /** + * "off":: The feature is not available for the course, user, or account and sub-accounts. + * "allowed":: (valid only on accounts) The feature is off in the account, but may be enabled in + * sub-accounts and courses by setting a feature flag on the sub-account or course. + * "on":: The feature is turned on unconditionally for the user, course, or account and sub-accounts. + */ + state?: false | 'allowed' | true; + }; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + feature: string; + }; + query?: never; + url: '/v1/users/{user_id}/features/flags/{feature}'; +}; + +export type SetFeatureFlagUsersResponses = { + /** + * No response was specified + */ + 200: FeatureFlag; +}; + +export type SetFeatureFlagUsersResponse = SetFeatureFlagUsersResponses[keyof SetFeatureFlagUsersResponses]; + +export type UploadFileToUsersFilesData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/files'; +}; + +export type UploadFileToUsersFilesResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetQuotaInformationUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/files/quota'; +}; + +export type GetQuotaInformationUsersResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type GetFileUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + id: string; + }; + query?: { + /** + * Array of additional information to include. + * + * "user":: the user who uploaded the file or last edited its content + * "usage_rights":: copyright and license information for the file (see UsageRights) + */ + include?: 'user'; + }; + url: '/v1/users/{user_id}/files/{id}'; +}; + +export type GetFileUsersResponses = { + /** + * No response was specified + */ + 200: File; +}; + +export type GetFileUsersResponse = GetFileUsersResponses[keyof GetFileUsersResponses]; + +export type ListAllFoldersUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/folders'; +}; + +export type ListAllFoldersUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListAllFoldersUsersResponse = ListAllFoldersUsersResponses[keyof ListAllFoldersUsersResponses]; + +export type CreateFolderUsersData = { + body: { + /** + * Flag the folder as hidden + */ + hidden?: boolean; + /** + * The datetime to lock the folder at + */ + lock_at?: string; + /** + * Flag the folder as locked + */ + locked?: boolean; + /** + * The name of the folder + */ + name: string; + /** + * The id of the folder to store the file in. If this and parent_folder_path are sent an error will be returned. If neither is given, a default folder will be used. + */ + parent_folder_id?: string; + /** + * The path of the folder to store the new folder in. The path separator is the forward slash `/`, never a back slash. The parent folder will be created if it does not already exist. This parameter only applies to new folders in a context that has folders, such as a user, a course, or a group. If this and parent_folder_id are sent an error will be returned. If neither is given, a default folder will be used. + */ + parent_folder_path?: string; + /** + * Set an explicit sort position for the folder + */ + position?: number; + /** + * The datetime to unlock the folder at + */ + unlock_at?: string; + }; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/folders'; +}; + +export type CreateFolderUsersResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type CreateFolderUsersResponse = CreateFolderUsersResponses[keyof CreateFolderUsersResponses]; + +export type ResolvePathUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/folders/by_path'; +}; + +export type ResolvePathUsersResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ResolvePathUsersResponse = ResolvePathUsersResponses[keyof ResolvePathUsersResponses]; + +export type ResolvePathUsersFullPathData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/folders/by_path/*full_path'; +}; + +export type ResolvePathUsersFullPathResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ResolvePathUsersFullPathResponse = ResolvePathUsersFullPathResponses[keyof ResolvePathUsersFullPathResponses]; + +export type GetFolderUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{user_id}/folders/{id}'; +}; + +export type GetFolderUsersResponses = { + /** + * No response was specified + */ + 200: Folder; +}; + +export type GetFolderUsersResponse = GetFolderUsersResponses[keyof GetFolderUsersResponses]; + +export type ListUserLoginsUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/logins'; +}; + +export type ListUserLoginsUsersResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type DeleteUserLoginData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + id: string; + }; + query?: never; + url: '/v1/users/{user_id}/logins/{id}'; +}; + +export type DeleteUserLoginResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type ListMissingSubmissionsData = { + body?: never; + path: { + /** + * the student's ID + */ + user_id: string; + }; + query?: { + /** + * "planner_overrides":: Optionally include the assignment's associated planner override, if it exists, for the current user. + * These will be returned under a +planner_override+ key + * "course":: Optionally include the assignments' courses + */ + include?: 'planner_overrides' | 'course'; + /** + * "submittable":: Only return assignments that the current user can submit (i.e. filter out locked assignments) + */ + filter?: 'submittable'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/missing_submissions'; +}; + +export type ListMissingSubmissionsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListMissingSubmissionsResponse = ListMissingSubmissionsResponses[keyof ListMissingSubmissionsResponses]; + +export type ListObserveesData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * - "avatar_url": Optionally include avatar_url. + */ + include?: 'avatar_url'; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/observees'; +}; + +export type ListObserveesResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListObserveesResponse = ListObserveesResponses[keyof ListObserveesResponses]; + +export type AddObserveeWithCredentialsData = { + body?: { + /** + * The access token for the user to observe. Required if observee[unique_id] or observee[password] are omitted. + */ + access_token?: string; + /** + * The password for the user to observe. Required if access_token is omitted. + */ + 'observee[password]'?: string; + /** + * The login id for the user to observe. Required if access_token is omitted. + */ + 'observee[unique_id]'?: string; + /** + * A generated pairing code for the user to observe. Required if the Observer pairing code feature flag is enabled + */ + pairing_code?: string; + /** + * The ID for the root account to associate with the observation link. + * Defaults to the current domain account. + * If 'all' is specified, a link will be created for each root account associated + * to both the observer and observee. + */ + root_account_id?: number; + }; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/observees'; +}; + +export type AddObserveeWithCredentialsResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type AddObserveeWithCredentialsResponse = AddObserveeWithCredentialsResponses[keyof AddObserveeWithCredentialsResponses]; + +export type RemoveObserveeData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + observee_id: string; + }; + query?: { + /** + * If specified, only removes the link for the given root account + */ + root_account_id?: number; + }; + url: '/v1/users/{user_id}/observees/{observee_id}'; +}; + +export type RemoveObserveeResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type RemoveObserveeResponse = RemoveObserveeResponses[keyof RemoveObserveeResponses]; + +export type ShowObserveeData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + observee_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/observees/{observee_id}'; +}; + +export type ShowObserveeResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type ShowObserveeResponse = ShowObserveeResponses[keyof ShowObserveeResponses]; + +export type AddObserveeData = { + body?: { + /** + * The ID for the root account to associate with the observation link. + * If not specified, a link will be created for each root account associated + * to both the observer and observee. + */ + root_account_id?: number; + }; + path: { + /** + * ID + */ + user_id: string; + /** + * ID + */ + observee_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/observees/{observee_id}'; +}; + +export type AddObserveeResponses = { + /** + * No response was specified + */ + 200: User; +}; + +export type AddObserveeResponse = AddObserveeResponses[keyof AddObserveeResponses]; + +export type ListUserPageViewsData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: { + /** + * The beginning of the time range from which you want page views. + */ + start_time?: string; + /** + * The end of the time range from which you want page views. + */ + end_time?: string; + /** + * The bookmark leading to the next paginated page. This needs to be parsed from the response header ('Link' field). + */ + page?: string; + /** + * The numbers of items to return. + */ + per_page?: number; + }; + url: '/v1/users/{user_id}/page_views'; +}; + +export type ListUserPageViewsResponses = { + /** + * No response was specified + */ + 200: Array; +}; + +export type ListUserPageViewsResponse = ListUserPageViewsResponses[keyof ListUserPageViewsResponses]; + +export type GetUserProfileData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/profile'; +}; + +export type GetUserProfileResponses = { + /** + * No response was specified + */ + 200: Profile; +}; + +export type GetUserProfileResponse = GetUserProfileResponses[keyof GetUserProfileResponses]; + +export type RemoveUsageRightsUsersData = { + body?: never; + path: { + /** + * ID + */ + user_id: string; + }; + query: { + /** + * List of ids of files to remove associated usage rights from. + */ + file_ids: Array; + /** + * List of ids of folders. Usage rights will be removed from all files in these folders. + */ + folder_ids?: Array; + }; + url: '/v1/users/{user_id}/usage_rights'; +}; + +export type RemoveUsageRightsUsersResponses = { + /** + * No response was specified + */ + 200: unknown; +}; + +export type SetUsageRightsUsersData = { + body: { + /** + * List of ids of files to set usage rights for. + */ + file_ids: Array; + /** + * List of ids of folders to search for files to set usage rights for. + * Note that new files uploaded to these folders do not automatically inherit these rights. + */ + folder_ids?: Array; + /** + * Whether the file(s) or folder(s) should be published on save, provided that usage rights have been specified (set to `true` to publish on save). + */ + publish?: boolean; + /** + * The legal copyright line for the files + */ + 'usage_rights[legal_copyright]'?: string; + /** + * The license that applies to the files. See the {api:UsageRightsController#licenses List licenses endpoint} for the supported license types. + */ + 'usage_rights[license]'?: string; + /** + * The intellectual property justification for using the files in Canvas + */ + 'usage_rights[use_justification]': 'own_copyright' | 'used_by_permission' | 'fair_use' | 'public_domain' | 'creative_commons'; + }; + path: { + /** + * ID + */ + user_id: string; + }; + query?: never; + url: '/v1/users/{user_id}/usage_rights'; +}; + +export type SetUsageRightsUsersResponses = { + /** + * No response was specified + */ + 200: UsageRights; +}; + +export type SetUsageRightsUsersResponse = SetUsageRightsUsersResponses[keyof SetUsageRightsUsersResponses]; + +export type ClientOptions = { + baseUrl: 'https://gitlab.com' | (string & {}); +}; \ No newline at end of file diff --git a/packages/canvas-api-client/src/index.ts b/packages/canvas-api-client/src/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/canvas-api-client/tsconfig.build.json b/packages/canvas-api-client/tsconfig.build.json new file mode 100644 index 00000000..19855420 --- /dev/null +++ b/packages/canvas-api-client/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src"], + "compilerOptions": { + "outDir": "./dist", + "declarationDir": "./dist/types" + } +} diff --git a/packages/canvas-api-client/vitest.config.ts b/packages/canvas-api-client/vitest.config.ts new file mode 100644 index 00000000..3f6ce8c5 --- /dev/null +++ b/packages/canvas-api-client/vitest.config.ts @@ -0,0 +1,9 @@ +/// +import { defineConfig } from "vite"; + +export default defineConfig({ + test: { + environment: "", + setupFiles: ["./vitest.setup.ts"], + }, +}); diff --git a/packages/canvas-api-client/vitest.setup.ts b/packages/canvas-api-client/vitest.setup.ts new file mode 100644 index 00000000..bb32bff7 --- /dev/null +++ b/packages/canvas-api-client/vitest.setup.ts @@ -0,0 +1,5 @@ +import "@testing-library/jest-dom/vitest"; +import { cleanup } from "@testing-library/react"; +import { afterEach } from "vitest"; + +afterEach(cleanup); From ce739a160ee61884f643b880c6a0c813fa2a0767 Mon Sep 17 00:00:00 2001 From: Sean Collings Date: Mon, 7 Apr 2025 17:59:36 -0600 Subject: [PATCH 2/5] feat: configuring canvas client --- packages/canvas-api-client/src/canvas.ts | 18 ++++++++++++++++++ .../src/generated/client.gen.ts | 2 +- packages/canvas-api-client/src/index.ts | 2 ++ packages/canvas-api-client/test.ts | 16 ++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 packages/canvas-api-client/src/canvas.ts create mode 100644 packages/canvas-api-client/test.ts diff --git a/packages/canvas-api-client/src/canvas.ts b/packages/canvas-api-client/src/canvas.ts new file mode 100644 index 00000000..8c55be84 --- /dev/null +++ b/packages/canvas-api-client/src/canvas.ts @@ -0,0 +1,18 @@ +import { client } from "./generated/client.gen"; + +interface CanvasClientConfig { + baseUrl: string; + token: string; + headers?: Record; + timeout?: number; +} + +export function configureClient(config: CanvasClientConfig) { + const { baseUrl, token, headers, timeout } = config; + + client.setConfig({ + baseUrl, + auth: token, + headers, + }); +} diff --git a/packages/canvas-api-client/src/generated/client.gen.ts b/packages/canvas-api-client/src/generated/client.gen.ts index 02e3db71..152924f5 100644 --- a/packages/canvas-api-client/src/generated/client.gen.ts +++ b/packages/canvas-api-client/src/generated/client.gen.ts @@ -14,5 +14,5 @@ import { type Config, type ClientOptions as DefaultClientOptions, createClient, export type CreateClientConfig = (override?: Config) => Config & T>; export const client = createClient(createConfig({ - baseUrl: 'https://gitlab.com' + baseUrl: 'https://gitlab.com', })); \ No newline at end of file diff --git a/packages/canvas-api-client/src/index.ts b/packages/canvas-api-client/src/index.ts index e69de29b..157e9be1 100644 --- a/packages/canvas-api-client/src/index.ts +++ b/packages/canvas-api-client/src/index.ts @@ -0,0 +1,2 @@ +export * from "./generated"; +export * from "./canvas"; diff --git a/packages/canvas-api-client/test.ts b/packages/canvas-api-client/test.ts new file mode 100644 index 00000000..d6a65c31 --- /dev/null +++ b/packages/canvas-api-client/test.ts @@ -0,0 +1,16 @@ +import * as CanvasClient from "./src"; + +CanvasClient.configureClient({ + baseUrl: "https://atomicjolt.instructure.com/api", + token: "TOKEN", +}); + +CanvasClient.getSubAccountsOfAccount({ + path: { + account_id: "1", + }, +}) + .then((response) => { + console.log(response.data); + }) + .catch(console.error); From e6562a655404945db8995a6bb22b3af85065c73d Mon Sep 17 00:00:00 2001 From: Sean Collings Date: Mon, 19 May 2025 17:09:10 -0600 Subject: [PATCH 3/5] feat: updated README --- packages/canvas-api-client/README.md | 19 +++++++++++++++++++ .../src/generated/client.gen.ts | 2 +- packages/canvas-api-client/test.ts | 16 ---------------- 3 files changed, 20 insertions(+), 17 deletions(-) delete mode 100644 packages/canvas-api-client/test.ts diff --git a/packages/canvas-api-client/README.md b/packages/canvas-api-client/README.md index 95803e3b..c03ccfda 100644 --- a/packages/canvas-api-client/README.md +++ b/packages/canvas-api-client/README.md @@ -10,4 +10,23 @@ To regenerate the API client from the OpenAPI spec: npm run generate ``` +## Usage +```typescript +import * as CanvasClient from "@atomicjolt/canvas-api-client"; + +CanvasClient.configureClient({ + baseUrl: "https://atomicjolt.instructure.com/api", + token: "TOKEN", +}); + +CanvasClient.getSubAccountsOfAccount({ + path: { + account_id: "1", + }, +}) + .then((response) => { + console.log(response.data); + }) + .catch(console.error); +``` diff --git a/packages/canvas-api-client/src/generated/client.gen.ts b/packages/canvas-api-client/src/generated/client.gen.ts index 152924f5..02e3db71 100644 --- a/packages/canvas-api-client/src/generated/client.gen.ts +++ b/packages/canvas-api-client/src/generated/client.gen.ts @@ -14,5 +14,5 @@ import { type Config, type ClientOptions as DefaultClientOptions, createClient, export type CreateClientConfig = (override?: Config) => Config & T>; export const client = createClient(createConfig({ - baseUrl: 'https://gitlab.com', + baseUrl: 'https://gitlab.com' })); \ No newline at end of file diff --git a/packages/canvas-api-client/test.ts b/packages/canvas-api-client/test.ts deleted file mode 100644 index d6a65c31..00000000 --- a/packages/canvas-api-client/test.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as CanvasClient from "./src"; - -CanvasClient.configureClient({ - baseUrl: "https://atomicjolt.instructure.com/api", - token: "TOKEN", -}); - -CanvasClient.getSubAccountsOfAccount({ - path: { - account_id: "1", - }, -}) - .then((response) => { - console.log(response.data); - }) - .catch(console.error); From 8edc75046ad8c770eeafce5e22d1c705a0a2739d Mon Sep 17 00:00:00 2001 From: Sean Collings Date: Mon, 19 May 2025 17:11:11 -0600 Subject: [PATCH 4/5] version bump --- packages/canvas-api-client/CHANGELOG.md | 7 +++++++ packages/canvas-api-client/package.json | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 packages/canvas-api-client/CHANGELOG.md diff --git a/packages/canvas-api-client/CHANGELOG.md b/packages/canvas-api-client/CHANGELOG.md new file mode 100644 index 00000000..46e8f371 --- /dev/null +++ b/packages/canvas-api-client/CHANGELOG.md @@ -0,0 +1,7 @@ +# @atomicjolt/canvas-api-client + +## 0.0.1 + +### Patch Changes + +- Intial Release of auto-generated Canvas API SDK diff --git a/packages/canvas-api-client/package.json b/packages/canvas-api-client/package.json index 66d8fa4b..0b5e4d75 100644 --- a/packages/canvas-api-client/package.json +++ b/packages/canvas-api-client/package.json @@ -1,12 +1,13 @@ { "name": "@atomicjolt/canvas-api-client", - "version": "0.0.0", + "version": "0.0.1", "license": "MIT", "type": "module", "main": "dist/index.js", "types": "dist/types/index.d.ts", "files": [ - "dist" + "dist", + "src" ], "scripts": { "build": "tsc -p ./tsconfig.build.json", From d65ee981ffeb3e80c235842a3bda279da0a7d609 Mon Sep 17 00:00:00 2001 From: Sean Collings Date: Mon, 19 May 2025 17:17:20 -0600 Subject: [PATCH 5/5] fix: update dependencies --- packages/canvas-api-client/package.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/canvas-api-client/package.json b/packages/canvas-api-client/package.json index 0b5e4d75..2207ae36 100644 --- a/packages/canvas-api-client/package.json +++ b/packages/canvas-api-client/package.json @@ -1,6 +1,6 @@ { "name": "@atomicjolt/canvas-api-client", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", "type": "module", "main": "dist/index.js", @@ -15,14 +15,10 @@ "prepublishOnly": "npm run build", "generate": "openapi-ts" }, - "peerDependencies": { - "axios": "^1.0.0" - }, "devDependencies": { - "@hey-api/client-fetch": "^0.10.0", "@hey-api/openapi-ts": "^0.66.3" }, "dependencies": { - "axios": "^1.0.0" + "@hey-api/client-fetch": "^0.10.0" } }