Skip to content

Commit

Permalink
feat: add API for InNoHassle Search, with token from Accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Jul 7, 2024
1 parent 171af6e commit f370b6e
Show file tree
Hide file tree
Showing 12 changed files with 2,163 additions and 120 deletions.
2 changes: 2 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ export default antfu({
'ts/ban-ts-comment': 'off',
'no-console': 'off',
},
}, {
ignores: ['**/__generated__.ts'],
})
26 changes: 26 additions & 0 deletions orval.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defineConfig } from 'orval'

export default defineConfig({
search: {
input: {
target: 'https://api.innohassle.ru/search/staging-v0/openapi.json',
},
output: {
mode: 'single',
target: './src/shared/innohassle-api/search/__generated__.ts',
client: 'axios',
override: {
mutator: {
path: './src/shared/innohassle-api/search/axios.ts',
name: 'searchQueryPromise',
},
},
},
hooks: {
afterAllFilesWrite: {
command: 'pnpm run lint:fix:generated',
injectGeneratedDirsAndFiles: false,
},
},
},
})
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@
"zip:firefox": "npm run build:firefox && BROWSER=firefox node scripts/zip.js",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint:fix:generated": "eslint **/__generated__.ts --fix --no-ignore || true",
"deps": "taze -wIr",
"release": "bumpp -r package.json backend/package.json",
"prepare": "simple-git-hooks || true"
"prepare": "simple-git-hooks || true",
"generate-api": "orval --config orval.config.ts"
},
"dependencies": {
"@unocss/reset": "^0.61.0",
"axios": "^1.7.2",
"clsx": "^2.1.1",
"moodle-typed-ws": "^0.4.0",
"object-to-formdata": "^4.5.1",
"orval": "^6.31.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwind-merge": "^2.3.0"
Expand Down
Loading

0 comments on commit f370b6e

Please # to comment.