{"_id":"@abrianto/smartschool-kit","_rev":"7-17d9bc8cbcf6feead45817799ba52e6e","name":"@abrianto/smartschool-kit","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.7":{"name":"@abrianto/smartschool-kit","version":"0.0.7","keywords":["smartschool","api","xml","abrianto"],"author":{"name":"Maarten Coppens"},"license":"MIT","_id":"@abrianto/smartschool-kit@0.0.7","maintainers":[{"name":"maartennnn","email":"martinuske@gmail.com"}],"homepage":"https://github.com/AbriantoLabs/smartschool-kit#readme","bugs":{"url":"https://github.com/AbriantoLabs/smartschool-kit/issues"},"dist":{"shasum":"e9ae0ac93076e7a72b146971348e72cb887026c0","tarball":"https://registry.npmjs.org/@abrianto/smartschool-kit/-/smartschool-kit-0.0.7.tgz","fileCount":41,"integrity":"sha512-duSDEvmQj8c5RWZzclsfKUwu+CmNlyd0FPZBpD9QvnrHoZIpHb4dLf1YR6xvo8j5G1rbpcO7XBTOgu241Upk9A==","signatures":[{"sig":"MEQCICdhCyEZyQ9LoyAD7law3mynFM1hxURENiyR+3R3Q1VXAiB5o6jp2pV3bB9RN5kbfVwLhBop5C7dPEZjZrYtUEYcBg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":413045},"main":"./dist/mod.js","types":"./dist/mod.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"016f1973787479ee2c3307b2d6d9bb0127f2db1c","scripts":{"test":"deno test","build":"tsc"},"_npmUser":{"name":"maartennnn","email":"martinuske@gmail.com"},"repository":{"url":"git+https://github.com/AbriantoLabs/smartschool-kit.git","type":"git"},"_npmVersion":"10.8.2","description":"A toolkit for Smartschool API interactions, both as a library and CLI. ","directories":{"test":"tests"},"_nodeVersion":"20.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/smartschool-kit_0.0.7_1745831415447_0.6302888148606507","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@abrianto/smartschool-kit","version":"0.0.8","keywords":["smartschool","api","xml","abrianto"],"author":{"name":"Maarten Coppens"},"license":"MIT","_id":"@abrianto/smartschool-kit@0.0.8","maintainers":[{"name":"maartennnn","email":"martinuske@gmail.com"}],"homepage":"https://github.com/AbriantoLabs/smartschool-kit#readme","bugs":{"url":"https://github.com/AbriantoLabs/smartschool-kit/issues"},"dist":{"shasum":"9971bccea46678a50038d2084f865f12b740b7e6","tarball":"https://registry.npmjs.org/@abrianto/smartschool-kit/-/smartschool-kit-0.0.8.tgz","fileCount":25,"integrity":"sha512-8tE2T1iRKqRLsFeD5dqs4YBx5FlK9f2mXE5Gx2mkT7vr91IYAND78gFNmjtnGCBtI/wvmmjO1OBkErMT9idB7A==","signatures":[{"sig":"MEUCIEYXA6UB0fNOz2zPszYITg2SQmdKAOQt8NtslCsZRFzFAiEAqJvXTGIvLD3t+SvdGJtd4bqRgZFuQUbqPoiAfD4UDZI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":210304},"main":"./dist/mod.js","types":"./dist/mod.d.ts","exports":{".":{"types":"./dist/mod.d.ts","import":"./dist/mod.js","require":"./dist/mod.js"}},"gitHead":"8bfcf8f39276a4dc05c81b41f91b7c4fbb2b6b89","scripts":{"test":"deno test","build":"tsc"},"_npmUser":{"name":"maartennnn","email":"martinuske@gmail.com"},"repository":{"url":"git+https://github.com/AbriantoLabs/smartschool-kit.git","type":"git"},"_npmVersion":"10.8.2","description":"A toolkit for Smartschool API interactions, both as a library and CLI. ","directories":{"test":"tests"},"_nodeVersion":"20.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/smartschool-kit_0.0.8_1745831809915_0.6082636000606481","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@abrianto/smartschool-kit","version":"0.0.9","keywords":["smartschool","api","xml","abrianto"],"author":{"name":"Maarten Coppens"},"license":"MIT","_id":"@abrianto/smartschool-kit@0.0.9","maintainers":[{"name":"maartennnn","email":"martinuske@gmail.com"}],"homepage":"https://github.com/AbriantoLabs/smartschool-kit#readme","bugs":{"url":"https://github.com/AbriantoLabs/smartschool-kit/issues"},"dist":{"shasum":"c0806ec38b4389abcd4ec6c545f23617f9e3cd00","tarball":"https://registry.npmjs.org/@abrianto/smartschool-kit/-/smartschool-kit-0.0.9.tgz","fileCount":19,"integrity":"sha512-bHS7RmuR3Ph2f7NYaSPgjEPi9MgP5yneVyh2Kgn5zXR3ZHTl+eBL3Vy8txfJMFr5er0v+jEj3zILPe7YDY5QUw==","signatures":[{"sig":"MEUCIQD6ke+pTiJDsNYQTkCSQ7KTrHy+s6EgAjvkure7Coex0wIgWacREby3zRlGvBLfqOZF7iB+EnD0pKW6C6xMKcMU+/I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":211672},"main":"./dist/mod.js","types":"./dist/mod.d.ts","exports":{".":{"types":"./dist/mod.d.ts","import":"./dist/mod.js","require":"./dist/mod.js"}},"gitHead":"4dfc11e1f22cf71674243ff34043adef53e12492","scripts":{"test":"deno test","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"maartennnn","email":"martinuske@gmail.com"},"repository":{"url":"git+https://github.com/AbriantoLabs/smartschool-kit.git","type":"git"},"_npmVersion":"10.8.2","description":"A toolkit for Smartschool API interactions, both as a library and CLI. ","directories":{"test":"tests"},"_nodeVersion":"20.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/smartschool-kit_0.0.9_1745832691898_0.1601576812817651","host":"s3://npm-registry-packages-npm-production"}},"0.0.10":{"name":"@abrianto/smartschool-kit","version":"0.0.10","keywords":["smartschool","api","xml","abrianto"],"author":{"name":"Maarten Coppens"},"license":"MIT","_id":"@abrianto/smartschool-kit@0.0.10","maintainers":[{"name":"maartennnn","email":"martinuske@gmail.com"}],"homepage":"https://github.com/AbriantoLabs/smartschool-kit#readme","bugs":{"url":"https://github.com/AbriantoLabs/smartschool-kit/issues"},"dist":{"shasum":"1e1d01bf89bbb13c105e55681972ed167177f637","tarball":"https://registry.npmjs.org/@abrianto/smartschool-kit/-/smartschool-kit-0.0.10.tgz","fileCount":19,"integrity":"sha512-QHVxx0JXhkBTMveHPtUusBp0KJKOh/iBQbNp77+/knY5Cov1PJ/p7gJx970A5PzQscokz+fAXiX5sxnKqqvb3g==","signatures":[{"sig":"MEQCIF70F5vMgpM0gnmkTZBKZiM1u9RxFq7RiGfo7d5Z29A6AiALsSRvkWQfW1QL/v4vJ2GqVRsYuQ7iGXEOgjWqaw28Xw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":211678},"main":"./dist/mod.js","types":"./dist/mod.d.ts","exports":{".":{"types":"./dist/mod.d.ts","import":"./dist/mod.js","require":"./dist/mod.js"}},"gitHead":"b62ded8cec2483599b4ec455b9ecae54253b301c","scripts":{"test":"deno test","build":"tsc && node fix-imports.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"maartennnn","email":"martinuske@gmail.com"},"repository":{"url":"git+https://github.com/AbriantoLabs/smartschool-kit.git","type":"git"},"_npmVersion":"10.8.2","description":"A toolkit for Smartschool API interactions, both as a library and CLI. ","directories":{"test":"tests"},"_nodeVersion":"20.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/smartschool-kit_0.0.10_1745833603781_0.7036309921029216","host":"s3://npm-registry-packages-npm-production"}},"0.0.11":{"name":"@abrianto/smartschool-kit","version":"0.0.11","keywords":["smartschool","api","xml","abrianto"],"author":{"name":"Maarten Coppens"},"license":"MIT","_id":"@abrianto/smartschool-kit@0.0.11","maintainers":[{"name":"maartennnn","email":"martinuske@gmail.com"}],"homepage":"https://github.com/AbriantoLabs/smartschool-kit#readme","bugs":{"url":"https://github.com/AbriantoLabs/smartschool-kit/issues"},"dist":{"shasum":"c125337e1fbc87393602dd0e8f9be2cffaf78e9d","tarball":"https://registry.npmjs.org/@abrianto/smartschool-kit/-/smartschool-kit-0.0.11.tgz","fileCount":19,"integrity":"sha512-ZM2McSD4dznr9YbQ2/Lv19VFPm/TD3V5fUoOGld1wp+rYXuxdaH+HsBbesvr8YB2v7erLoT6wYfa7JUtjOwF2Q==","signatures":[{"sig":"MEQCICpGqN2lZlaSrTUNs6gc0+IQQmgJAinBGxusmI7aY1s6AiAbb/At7whU7iRNxivyQfzG1V096TCKuKl+Qpsd2CUhbQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":212559},"main":"./dist/mod.js","types":"./dist/mod.d.ts","exports":{".":{"types":"./dist/mod.d.ts","import":"./dist/mod.js","require":"./dist/mod.js"}},"gitHead":"41b902350d80163dd5bfcdf32fc609478a58edb6","scripts":{"test":"deno test","build":"tsc && node fix-imports.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"maartennnn","email":"martinuske@gmail.com"},"repository":{"url":"git+https://github.com/AbriantoLabs/smartschool-kit.git","type":"git"},"_npmVersion":"10.8.2","description":"A toolkit for Smartschool API interactions, both as a library and CLI. ","directories":{"test":"tests"},"_nodeVersion":"20.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/smartschool-kit_0.0.11_1749117808082_0.8492739044220823","host":"s3://npm-registry-packages-npm-production"}},"0.0.13":{"name":"@abrianto/smartschool-kit","version":"0.0.13","keywords":["smartschool","api","xml","abrianto"],"author":{"name":"Maarten Coppens"},"license":"MIT","_id":"@abrianto/smartschool-kit@0.0.13","maintainers":[{"name":"maartennnn","email":"martinuske@gmail.com"}],"homepage":"https://github.com/AbriantoLabs/smartschool-kit#readme","bugs":{"url":"https://github.com/AbriantoLabs/smartschool-kit/issues"},"bin":{"smartschool":"dist/node-cli.js"},"dist":{"shasum":"1d9d3c9514de5d2be3099b5960375a22263e056c","tarball":"https://registry.npmjs.org/@abrianto/smartschool-kit/-/smartschool-kit-0.0.13.tgz","fileCount":12,"integrity":"sha512-xZaXO24DkTLh9tf8CEvhcaC8Vd1ph+D1u/HfnV5NxJI4dskZq8AqdNlhi/tpsp9bv/j0w33wdJSuu6bmYvDsNg==","signatures":[{"sig":"MEUCICHu4AiSbMdQwAXKdoqUQJKXwti1JPsy07oFyyNRcJIMAiEAwRFxXgGhATW8B6tUcq6X7ZCdifnymKFDFpz64ZYpcNU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":232195},"main":"./dist/mod.js","types":"./dist/mod.d.ts","exports":{".":{"types":"./dist/mod.d.ts","import":"./dist/mod.js","require":"./dist/mod.js"}},"gitHead":"66a1a034f22a786613cf8489cd1a61d2d50524ca","scripts":{"test":"deno test","build":"npm run build:npm && npm run build:deno","build:npm":"node fix-imports.js && tsc && rm -rf build-temp","build:deno":"deno check src/mod.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"maartennnn","email":"martinuske@gmail.com"},"repository":{"url":"git+https://github.com/AbriantoLabs/smartschool-kit.git","type":"git"},"_npmVersion":"10.8.2","description":"A toolkit for Smartschool API interactions, both as a library and CLI. ","directories":{"test":"tests"},"_nodeVersion":"20.19.0","dependencies":{"inquirer":"^8.2.5"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3","@types/node":"^22.15.30"},"_npmOperationalInternal":{"tmp":"tmp/smartschool-kit_0.0.13_1749730976968_0.2532654213177945","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"_id":"@abrianto/smartschool-kit@0.1.0","bin":{"smartschool":"dist/node-cli.js"},"bugs":{"url":"https://github.com/AbriantoLabs/smartschool-kit/issues"},"dist":{"shasum":"6d4505c09885b0011611b70dfac6525e0a716058","tarball":"https://registry.npmjs.org/@abrianto/smartschool-kit/-/smartschool-kit-0.1.0.tgz","fileCount":14,"integrity":"sha512-L/SmJRbnbzbmcqiNdIYI+nPZRKLGNgmVVrY79H+1phjGzCx90D7PzUGFtnBLaVqzndzYiNwSX73aGhI+ifkePA==","signatures":[{"sig":"MEUCIGfL8MVr0yTAb8EE5GOcRehClsQGzgElWDfjkcpBU3k3AiEAzGx8Lcwi76VXh6q+70AKOymCDBqsIL0vkTHnDJCFnL4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDsX9hxNWfC1sHkXn4Yw6yqwY1Daka0RkakqMHXVdqV/wIgJ+qVlkq3jBXxEkwScLtDSUeFgV+tYa6R3Wn9Xeq7cyo="}],"unpackedSize":267831},"main":"./dist/mod.js","name":"@abrianto/smartschool-kit","types":"./dist/mod.d.ts","author":{"name":"Maarten Coppens"},"exports":{".":{"types":"./dist/mod.d.ts","import":"./dist/mod.js","require":"./dist/mod.js"}},"gitHead":"2ef72044caf0a8b35be5136dde68f884bd91e0ad","license":"MIT","scripts":{"test":"deno test","build":"npm run build:npm && npm run build:deno","build:npm":"node fix-imports.js && tsc && rm -rf build-temp","build:deno":"deno check src/mod.ts","prepublishOnly":"npm run build"},"version":"0.1.0","_npmUser":{"name":"maartennnn","email":"martinuske@gmail.com"},"homepage":"https://github.com/AbriantoLabs/smartschool-kit#readme","keywords":["smartschool","api","xml","abrianto"],"repository":{"url":"git+https://github.com/AbriantoLabs/smartschool-kit.git","type":"git"},"_npmVersion":"11.12.1","description":"A toolkit for Smartschool API interactions, both as a library and CLI. ","directories":{"test":"tests"},"maintainers":[{"name":"maartennnn","email":"martinuske@gmail.com"}],"_nodeVersion":"24.15.0","dependencies":{"inquirer":"^8.2.5"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3","@types/node":"^22.15.30"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/smartschool-kit_0.1.0_1790870818842_0.7373664135717604"}}},"time":{"created":"2025-04-28T09:10:15.367Z","modified":"2026-10-01T16:06:59.146Z","0.0.7":"2025-04-28T09:10:15.602Z","0.0.8":"2025-04-28T09:16:50.102Z","0.0.9":"2025-04-28T09:31:32.074Z","0.0.10":"2025-04-28T09:46:43.980Z","0.0.11":"2025-06-05T10:03:28.248Z","0.0.13":"2025-06-12T12:22:57.186Z","0.1.0":"2026-10-01T16:06:58.948Z"},"bugs":{"url":"https://github.com/AbriantoLabs/smartschool-kit/issues"},"author":{"name":"Maarten Coppens"},"license":"MIT","homepage":"https://github.com/AbriantoLabs/smartschool-kit#readme","keywords":["smartschool","api","xml","abrianto"],"repository":{"url":"git+https://github.com/AbriantoLabs/smartschool-kit.git","type":"git"},"description":"A toolkit for Smartschool API interactions, both as a library and CLI. ","maintainers":[{"name":"maartennnn","email":"martinuske@gmail.com"}],"readme":"# Smartschool\n\nA modern, TypeScript-based, non-opinionated client for the Smartschool's APIs.\nThis client provides a simple interface to interact with all Smartschool API\nendpoints.\n\n## Features\n\n- 🚀 Runtime agnostic (works in Deno, Browser, Node.js)\n- 💪 Full TypeScript support with comprehensive type definitions\n- 🔧 CLI interface for quick operations\n- 🎯 Supports all Smartschool API endpoints\n- 📘 Detailed documentation for each method\n\n## Installation\n\n### From NPM:\n\n```bash\nnpm i @abrianto/smartschool-kit\n\nimport { SmartschoolClient } from '@abrianto/smartschool-kit'\n```\n\n### From JSR.io\n\n```bash\n# From JSR\njsr add @abrianto/smartschool-kit\n\n# Direct import\nimport { SmartschoolClient } from \"jsr:@abrianto/smartschool-kit\";\n```\n\n## Usage\n\n### As a Library\n\n```typescript\nimport { SmartschoolClient } from \"@abrianto/smartschool-kit\";\n\nconst client = new SmartschoolClient({\n  apiEndpoint: \"https://your-school.smartschool.be/Webservices/V3\",\n  accesscode: \"your-access-code\",\n});\n\n// Create a user\nawait client.saveUser({\n  username: \"john.doe\",\n  name: \"John\",\n  surname: \"Doe\",\n  email: \"john@example.com\",\n  basisrol: \"leerkracht\",\n});\n\n// Send a message\nawait client.sendMsg({\n  userIdentifier: \"john.doe\",\n  title: \"Welcome\",\n  body: \"Welcome to Smartschool!\",\n  senderIdentifier: \"admin\",\n});\n\n// Get user details\nconst userDetails = await client.getUserDetails({\n  userIdentifier: \"john.doe\",\n});\n```\n\n### Configuration options\n\n```typescript\nconst client = new SmartschoolClient({\n  apiEndpoint: \"https://your-school.smartschool.be/Webservices/V3\",\n  accesscode: \"your-access-code\",\n\n  // Optional: per-attempt timeout in ms (default 30000, 0 disables)\n  timeoutMs: 30000,\n\n  // Optional: retry failed requests (default 0 = no retries).\n  // Only network errors, timeouts and HTTP 429/502/503/504 are retried —\n  // API calls are not idempotent, so everything else fails fast.\n  maxRetries: 2,\n\n  // Optional: base delay in ms for exponential backoff between\n  // retries; the delay before retry N is retryDelayMs * 2^(N-1) (default 300)\n  retryDelayMs: 300,\n});\n```\n\nThe constructor validates that `apiEndpoint` and `accesscode` are present. The\nclient fetches the API's error-code table once per instance — the fetch is\nshared across concurrent requests, and if it fails, requests proceed with\nuntranslated error codes.\n\n### Using the CLI\n\n### NPM:\n\n```bash\nnpm i -g @abrianto/smartschool-kit\n```\n\n### Using the repository and Deno\n\n```bash\n# Get help\ndeno run --allow-net ./bin/cli.ts --help\n\n# Create a user, skip optional parameters\ndeno run --allow-net ./bin/cli.ts \\\n  --method=saveUser \\\n  --config=./config.json \\\n  --username=john.doe \\\n  --name=John \\\n  --surname=Doe \\\n  --skip\n\n# Send a message\ndeno run --allow-net --allow-read --allow-env ./bin/cli.ts \\\n  --config=./config.json \\\n  --method=sendMsg \\\n  --userIdentifier=jane.roe \\\n  --title=Hallo \\\n  --body=\"Lorem ipsum\"\n\n# Get absents\ndeno run --allow-net --allow-read --allow-env ./bin/cli.ts \\\n  --config=./config.json \\\n  --method=getAbsents \\\n  --userIdentifier=jane.roe \\\n  --schoolYear=2025\n\n# Interactive mode\ndeno run --allow-net cli.ts --interactive\n```\n\n## Available Methods\n\nSee [coverage](API-COVERAGE.md)\n\n### User Management\n\n- `saveUser` - Create or update a user (upsert, overwrites existing accounts)\n- `createUser` - Create a user, refusing to overwrite an existing username\n- `findUserByUsername` - Get user details, or `null` when the user doesn't exist\n- `getUserDetails` - Get user details\n- `getUserDetailsByNumber` - Get user details by internal number\n- `getUserDetailsByUsername` - Get user details by username\n- `getUserDetailsByScannableCode` - Get user details by scannable code\n- `delUser` - Delete a user (optional `officialDate`)\n- `setAccountStatus` - Set user account status\n- `changeUsername` - Change a user's username\n- `changeInternNumber` - Change a user's internal number\n- `changePasswordAtNextLogin` - Force password change at next login\n- `forcePasswordReset` - Force password reset\n- `replaceInum` - Replace internal user number\n- `saveUserParameter` - Update user parameters (e.g., co-accounts)\n- `changeGroupOwners` - Update group owners\n\n### Groups and Classes\n\n- `saveGroup` - Create or update a group\n- `saveClass` - Create or update a class (optional `instituteNumber`,\n  `adminNumber`, `schoolYearDate`)\n- `getAllGroupsAndClasses` - Get all groups and classes\n- `getClassList` - Get class list\n- `getClassListJson` - Get class list in JSON\n- `getClassTeachers` - Get class teachers (optional `getAllOwners`)\n- `saveUserToGroup` - Add user to group (via\n  `saveUserToClass`/`saveUserToClasses`)\n- `removeUserFromGroup` - Remove user from group (optional `officialDate`)\n- `delClass` - Delete a class\n- `saveClassList` - Bulk update class list (serialized)\n- `saveClassListJson` - Bulk update class list (JSON)\n- `getSchoolyearDataOfClass` - Get class metadata (e.g., year)\n- `saveSchoolyearDataOfClass` - Update class metadata\n- `getSkoreClassTeacherCourseRelation` - Teacher-course links\n\n### Messages\n\n- `sendMsg` - Send a message (optional `attachments`, `coaccount`, `copyToLVS`)\n- `saveSignature` - Save message signature\n\n### Absences\n\n- `getAbsents` - Get user absences\n- `getAbsentsWithAlias` - Get absences with alias\n- `getAbsentsByDate` - Get absences by date\n- `getAbsentsWithAliasByDate` - Get absences with alias by date\n- `getAbsentsWithInternalNumberByDate` - Get absences by internal number and\n  date\n- `getAbsentsWithUsernameByDate` - Get absences by username and date\n- `getAbsentsByDateAndGroup` - Get absences by date and group\n\n### Photos\n\n- `getAccountPhoto` - Get user photo\n- `setAccountPhoto` - Set user photo\n\n### Courses\n\n- `addCourse` - Add a course (optional `visibility`)\n- `addCourseStudents` - Add students to course\n- `addCourseTeacher` - Add teacher to course\n- `getCourses` - Get all courses\n\n### Helpdesk\n\n- `addHelpdeskTicket` - Add a helpdesk ticket\n- `getHelpdeskMiniDbItems` - Get helpdesk items\n\n### Password Management\n\n- `savePassword` - Set/update password\n\n### Account Management\n\n- `getAllAccounts` - List all accounts\n- `getAllAccountsExtended` - Extended list of accounts\n- `getUserOfficialClass` - Get user’s official class (optional `date`)\n\n### Data Sync/System\n\n- `startSkoreSync` - Start synchronization\n- `checkStatus` - Check service status\n- `clearGroup` - Remove all users from a group (optional `officialDate`)\n- `unregisterStudent` - Unregister student (optional `officialDate`)\n\n### Co-Accounts\n\n- `removeCoAccount` - Delete co-account\n\n### Student Career\n\n- `getStudentCareer` - Get student career history\n\n### Parameters\n\n- `getReferenceField` - Retrieve reference field\n\n### Error Handling\n\n**Note:** The API itself handles error code translations. By default, the API\nreturns error codes, and we fetch them to translate them into clear error\nmessages using the `SmartschoolError` class.\n\n- `returnCsvErrorCodes` - List error codes in CSV\n- `returnJsonErrorCodes` - List error codes in JSON\n\n### Deprecated\n\n- `deactivateTwoFactorAuthentication` - No longer supported by Smartschool\n\n## Type Definitions\n\nThe client includes comprehensive TypeScript definitions for all methods.\nExample:\n\n```typescript\ninterface SaveUser {\n  username: string;\n  name: string;\n  surname: string;\n  basisrol: string;\n  email?: string;\n  // ... other optional fields\n}\n\ninterface SendMessage {\n  userIdentifier: string;\n  title: string;\n  body: string;\n  senderIdentifier?: string;\n  attachments?: Array<{\n    filename: string;\n    filedata: string;\n  }>;\n  coaccount?: number;\n  copyToLVS?: boolean;\n}\n```\n\n## Error handling\n\nAll failures — transport-level and API-level — surface as `SmartschoolError`\nwith a `code` (unchanged, e.g. `\"12\"`) and a readable `reason`\n(`\"USER_NOT_FOUND\"`). Compare against the exported `SmartschoolErrorCode` names\nwith `error.is(...)` instead of memorising numeric codes:\n\n```typescript\nimport {\n  SmartschoolError,\n  SmartschoolErrorCode,\n} from \"@abrianto/smartschool-kit\";\n\ntry {\n  await client.getUserDetailsByUsername({ username: \"john.doe\" });\n} catch (error) {\n  if (error instanceof SmartschoolError) {\n    if (error.is(SmartschoolErrorCode.USER_NOT_FOUND)) {\n      // code \"9\", \"12\" or \"25\": Smartschool has several codes for this\n    } else if (error.is(SmartschoolErrorCode.TIMEOUT)) {\n      // ...\n    } else {\n      console.error(error.code, error.reason, error.message);\n    }\n  }\n}\n```\n\n| `error.reason`           | `error.code`           | Meaning                                                               |\n| ------------------------ | ---------------------- | --------------------------------------------------------------------- |\n| `USER_NOT_FOUND`         | `\"9\"`, `\"12\"`, `\"25\"`  | The user does not exist.                                              |\n| `USERNAME_EXISTS`        | `\"6\"`, `\"15\"`, `\"26\"`  | The username is already taken.                                        |\n| `INTERNAL_NUMBER_EXISTS` | `\"16\"`, `\"24\"`, `\"48\"` | The internal number is already in use.                                |\n| `INVALID_ACCESS_CODE`    | `\"8\"`                  | The webservices access code is wrong.                                 |\n| `ROSTER_CODE_NOT_UNIQUE` | `\"57\"`                 | The roster code (`untis`) is already in use.                          |\n| ... (all 57 codes)       | `\"1\"` .. `\"57\"`        | See `SMARTSCHOOL_ERROR_CODE_TABLE` / `SmartschoolErrorCode`.          |\n| `SOAP_FAULT`             | `SOAP_FAULT`           | SOAP fault; the message carries Smartschool's `faultstring`.          |\n| `HTTP_<status>`          | `HTTP_<status>`        | Non-2xx HTTP response (e.g. `HTTP_500`).                              |\n| `INVALID_ROLE`           | `INVALID_ROLE`         | Client-side: `basisrol` is not a `SmartschoolRole` (no request sent). |\n| `TIMEOUT`                | `TIMEOUT`              | Request exceeded `timeoutMs` and the retry budget.                    |\n| `NETWORK`                | `NETWORK`              | Fetch failed at the network level after the retry budget.             |\n\nReasons that group several codes: `USER_NOT_FOUND` (9, 12, 25),\n`USERNAME_EXISTS` (6, 15, 26) and `INTERNAL_NUMBER_EXISTS` (16, 24, 48). All\nother codes have their own reason. Unknown numeric codes have\n`reason === undefined`; the `message` is still Smartschool's own translated\ntext.\n\n## Safe helpers\n\n`basisrol` must be one of `SmartschoolRole` (`TEACHER` = `leerkracht`, `STUDENT`\n= `leerling`, `MANAGEMENT` = `directie`, `OTHER` = `andere`). `saveUser` and\n`createUser` throw a `SmartschoolError` (`INVALID_ROLE`) for anything else,\nbefore sending a request.\n\n`saveUser` is an upsert: calling it with an existing username silently\noverwrites that account. Two helpers avoid the footguns:\n\n```typescript\n// null instead of an exception when the user doesn't exist\nconst user = await client.findUserByUsername(\"john.doe\");\n\n// throws SmartschoolError (reason USERNAME_EXISTS, code \"6\") instead of\n// overwriting an existing account; returns the fresh user details otherwise\nconst created = await client.createUser({\n  username: \"john.doe\",\n  name: \"John\",\n  surname: \"Doe\",\n  basisrol: \"leerkracht\",\n});\n```\n\n`createUser` checks and saves in two calls, so it is not atomic against\nconcurrent creators.\n\n## CLI Configuration\n\nCreate a `config.json` file:\n\n```json\n{\n  \"apiEndpoint\": \"https://your-school.smartschool.be/Webservices/V3\",\n  \"accesscode\": \"your-access-code\"\n}\n```\n\n## Contributing\n\nContributions are welcome! Please submit pull requests with any improvements.\n\n## License\n\nMIT License - see LICENSE file for details\n","readmeFilename":"README.md"}