diff --git a/assets/icon/icon-optimized.svg b/assets/icon/icon-optimized.svg
new file mode 100644
index 0000000..d5009e7
--- /dev/null
+++ b/assets/icon/icon-optimized.svg
@@ -0,0 +1,9 @@
+
+
diff --git a/assets/icon/icon-transparent-optimized.svg b/assets/icon/icon-transparent-optimized.svg
new file mode 100644
index 0000000..b20beb0
--- /dev/null
+++ b/assets/icon/icon-transparent-optimized.svg
@@ -0,0 +1,8 @@
+
+
diff --git a/assets/icon/icon-transparent.svg b/assets/icon/icon-transparent.svg
new file mode 100644
index 0000000..654805c
--- /dev/null
+++ b/assets/icon/icon-transparent.svg
@@ -0,0 +1,79 @@
+
+
+
+
diff --git a/assets/icon/icon.svg b/assets/icon/icon.svg
new file mode 100644
index 0000000..fa405e8
--- /dev/null
+++ b/assets/icon/icon.svg
@@ -0,0 +1,87 @@
+
+
+
+
diff --git a/openapitools.json b/openapitools.json
new file mode 100644
index 0000000..6cf2ff4
--- /dev/null
+++ b/openapitools.json
@@ -0,0 +1,7 @@
+{
+ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
+ "spaces": 2,
+ "generator-cli": {
+ "version": "7.0.1"
+ }
+}
diff --git a/package.json b/package.json
index 8c1a7d0..0000354 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"test": "vitest",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
- "api:generate": "openapi -i ./src/lib/api/firefly-iii-2.0.10-v1.yaml -o ./src/lib/api --request ./src/lib/api/request.ts"
+ "api:generate": "openapi-generator-cli generate -g typescript-fetch -i ./src/lib/api/firefly-iii-2.0.10-v1.yaml -o ./src/lib/api"
},
"dependencies": {
"@iconify/svelte": "^3.1.4",
@@ -23,7 +23,6 @@
"chart.js": "^4.4.0",
"d3-scale-chromatic": "^3.0.0",
"dayjs": "^1.11.10",
- "firefly-iii-typescript-sdk-fetch": "github:michaelhthomas/firefly-iii-typescript-sdk-fetch#main",
"flowbite": "^2.0.0",
"flowbite-svelte": "^0.44.19",
"svelte-chartjs": "^3.1.2",
@@ -34,6 +33,7 @@
"zod": "^3.22.4"
},
"devDependencies": {
+ "@openapitools/openapi-generator-cli": "^2.7.0",
"@sveltejs/adapter-auto": "^2.1.0",
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.25.2",
@@ -49,7 +49,6 @@
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-svelte": "^2.34.0",
"eslint-plugin-unused-imports": "^3.0.0",
- "openapi-typescript-codegen": "^0.25.0",
"postcss": "8.4.31",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c849bc1..e262cdd 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -29,9 +29,6 @@ dependencies:
dayjs:
specifier: ^1.11.10
version: 1.11.10
- firefly-iii-typescript-sdk-fetch:
- specifier: github:michaelhthomas/firefly-iii-typescript-sdk-fetch#main
- version: github.com/michaelhthomas/firefly-iii-typescript-sdk-fetch/70f794d824bd19dfaaa482710ef40e76984b8910
flowbite:
specifier: ^2.0.0
version: 2.0.0
@@ -58,6 +55,9 @@ dependencies:
version: 3.22.4
devDependencies:
+ '@openapitools/openapi-generator-cli':
+ specifier: ^2.7.0
+ version: 2.7.0
'@sveltejs/adapter-auto':
specifier: ^2.1.0
version: 2.1.0(@sveltejs/kit@1.25.2)
@@ -103,9 +103,6 @@ devDependencies:
eslint-plugin-unused-imports:
specifier: ^3.0.0
version: 3.0.0(@typescript-eslint/eslint-plugin@6.7.5)(eslint@8.51.0)
- openapi-typescript-codegen:
- specifier: ^0.25.0
- version: 0.25.0
postcss:
specifier: 8.4.31
version: 8.4.31
@@ -165,21 +162,11 @@ packages:
'@jridgewell/gen-mapping': 0.3.3
'@jridgewell/trace-mapping': 0.3.19
- /@apidevtools/json-schema-ref-parser@9.0.9:
- resolution: {integrity: sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==}
- dependencies:
- '@jsdevtools/ono': 7.1.3
- '@types/json-schema': 7.0.13
- call-me-maybe: 1.0.2
- js-yaml: 4.1.0
- dev: true
-
/@babel/runtime@7.23.2:
resolution: {integrity: sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==}
engines: {node: '>=6.9.0'}
dependencies:
regenerator-runtime: 0.14.0
- dev: false
/@esbuild/android-arm64@0.18.20:
resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==}
@@ -480,14 +467,84 @@ packages:
'@jridgewell/resolve-uri': 3.1.1
'@jridgewell/sourcemap-codec': 1.4.15
- /@jsdevtools/ono@7.1.3:
- resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==}
- dev: true
-
/@kurkle/color@0.3.2:
resolution: {integrity: sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==}
dev: false
+ /@lukeed/csprng@1.1.0:
+ resolution: {integrity: sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==}
+ engines: {node: '>=8'}
+ dev: true
+
+ /@nestjs/axios@0.1.0(@nestjs/common@9.3.11)(reflect-metadata@0.1.13)(rxjs@7.8.0):
+ resolution: {integrity: sha512-b2TT2X6BFbnNoeteiaxCIiHaFcSbVW+S5yygYqiIq5i6H77yIU3IVuLdpQkHq8/EqOWFwMopLN8jdkUT71Am9w==}
+ peerDependencies:
+ '@nestjs/common': ^7.0.0 || ^8.0.0 || ^9.0.0
+ reflect-metadata: ^0.1.12
+ rxjs: ^6.0.0 || ^7.0.0
+ dependencies:
+ '@nestjs/common': 9.3.11(reflect-metadata@0.1.13)(rxjs@7.8.0)
+ axios: 0.27.2
+ reflect-metadata: 0.1.13
+ rxjs: 7.8.0
+ transitivePeerDependencies:
+ - debug
+ dev: true
+
+ /@nestjs/common@9.3.11(reflect-metadata@0.1.13)(rxjs@7.8.0):
+ resolution: {integrity: sha512-IFZ2G/5UKWC2Uo7tJ4SxGed2+aiA+sJyWeWsGTogKVDhq90oxVBToh+uCDeI31HNUpqYGoWmkletfty42zUd8A==}
+ peerDependencies:
+ cache-manager: <=5
+ class-transformer: '*'
+ class-validator: '*'
+ reflect-metadata: ^0.1.12
+ rxjs: ^7.1.0
+ peerDependenciesMeta:
+ cache-manager:
+ optional: true
+ class-transformer:
+ optional: true
+ class-validator:
+ optional: true
+ dependencies:
+ iterare: 1.2.1
+ reflect-metadata: 0.1.13
+ rxjs: 7.8.0
+ tslib: 2.5.0
+ uid: 2.0.1
+ dev: true
+
+ /@nestjs/core@9.3.11(@nestjs/common@9.3.11)(reflect-metadata@0.1.13)(rxjs@7.8.0):
+ resolution: {integrity: sha512-CI27a2JFd5rvvbgkalWqsiwQNhcP4EAG5BUK8usjp29wVp1kx30ghfBT8FLqIgmkRVo65A0IcEnWsxeXMntkxQ==}
+ requiresBuild: true
+ peerDependencies:
+ '@nestjs/common': ^9.0.0
+ '@nestjs/microservices': ^9.0.0
+ '@nestjs/platform-express': ^9.0.0
+ '@nestjs/websockets': ^9.0.0
+ reflect-metadata: ^0.1.12
+ rxjs: ^7.1.0
+ peerDependenciesMeta:
+ '@nestjs/microservices':
+ optional: true
+ '@nestjs/platform-express':
+ optional: true
+ '@nestjs/websockets':
+ optional: true
+ dependencies:
+ '@nestjs/common': 9.3.11(reflect-metadata@0.1.13)(rxjs@7.8.0)
+ '@nuxtjs/opencollective': 0.3.2
+ fast-safe-stringify: 2.1.1
+ iterare: 1.2.1
+ path-to-regexp: 3.2.0
+ reflect-metadata: 0.1.13
+ rxjs: 7.8.0
+ tslib: 2.5.0
+ uid: 2.0.1
+ transitivePeerDependencies:
+ - encoding
+ dev: true
+
/@nodelib/fs.scandir@2.1.5:
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@@ -509,6 +566,51 @@ packages:
fastq: 1.15.0
dev: true
+ /@nuxtjs/opencollective@0.3.2:
+ resolution: {integrity: sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==}
+ engines: {node: '>=8.0.0', npm: '>=5.0.0'}
+ hasBin: true
+ dependencies:
+ chalk: 4.1.2
+ consola: 2.15.3
+ node-fetch: 2.7.0
+ transitivePeerDependencies:
+ - encoding
+ dev: true
+
+ /@openapitools/openapi-generator-cli@2.7.0:
+ resolution: {integrity: sha512-ieEpHTA/KsDz7ANw03lLPYyjdedDEXYEyYoGBRWdduqXWSX65CJtttjqa8ZaB1mNmIjMtchUHwAYQmTLVQ8HYg==}
+ engines: {node: '>=10.0.0'}
+ hasBin: true
+ requiresBuild: true
+ dependencies:
+ '@nestjs/axios': 0.1.0(@nestjs/common@9.3.11)(reflect-metadata@0.1.13)(rxjs@7.8.0)
+ '@nestjs/common': 9.3.11(reflect-metadata@0.1.13)(rxjs@7.8.0)
+ '@nestjs/core': 9.3.11(@nestjs/common@9.3.11)(reflect-metadata@0.1.13)(rxjs@7.8.0)
+ '@nuxtjs/opencollective': 0.3.2
+ chalk: 4.1.2
+ commander: 8.3.0
+ compare-versions: 4.1.4
+ concurrently: 6.5.1
+ console.table: 0.10.0
+ fs-extra: 10.1.0
+ glob: 7.1.6
+ inquirer: 8.2.5
+ lodash: 4.17.21
+ reflect-metadata: 0.1.13
+ rxjs: 7.8.0
+ tslib: 2.0.3
+ transitivePeerDependencies:
+ - '@nestjs/microservices'
+ - '@nestjs/platform-express'
+ - '@nestjs/websockets'
+ - cache-manager
+ - class-transformer
+ - class-validator
+ - debug
+ - encoding
+ dev: true
+
/@polka/url@1.0.0-next.23:
resolution: {integrity: sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==}
@@ -883,6 +985,13 @@ packages:
uri-js: 4.4.1
dev: true
+ /ansi-escapes@4.3.2:
+ resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==}
+ engines: {node: '>=8'}
+ dependencies:
+ type-fest: 0.21.3
+ dev: true
+
/ansi-regex@5.0.1:
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
engines: {node: '>=8'}
@@ -946,6 +1055,10 @@ packages:
resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==}
dev: true
+ /asynckit@0.4.0:
+ resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
+ dev: true
+
/autoprefixer@10.4.16(postcss@8.4.31):
resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==}
engines: {node: ^10 || ^12 || >=14}
@@ -962,6 +1075,15 @@ packages:
postcss-value-parser: 4.2.0
dev: true
+ /axios@0.27.2:
+ resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==}
+ dependencies:
+ follow-redirects: 1.15.3
+ form-data: 4.0.0
+ transitivePeerDependencies:
+ - debug
+ dev: true
+
/axobject-query@3.2.1:
resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==}
dependencies:
@@ -971,11 +1093,23 @@ packages:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
dev: true
+ /base64-js@1.5.1:
+ resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
+ dev: true
+
/binary-extensions@2.2.0:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
engines: {node: '>=8'}
dev: true
+ /bl@4.1.0:
+ resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}
+ dependencies:
+ buffer: 5.7.1
+ inherits: 2.0.4
+ readable-stream: 3.6.2
+ dev: true
+
/brace-expansion@1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
dependencies:
@@ -1011,15 +1145,18 @@ packages:
resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}
dev: true
+ /buffer@5.7.1:
+ resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==}
+ dependencies:
+ base64-js: 1.5.1
+ ieee754: 1.2.1
+ dev: true
+
/cac@6.7.14:
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
engines: {node: '>=8'}
dev: true
- /call-me-maybe@1.0.2:
- resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==}
- dev: true
-
/callsites@3.1.0:
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
engines: {node: '>=6'}
@@ -1030,11 +1167,6 @@ packages:
engines: {node: '>= 6'}
dev: true
- /camelcase@6.3.0:
- resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==}
- engines: {node: '>=10'}
- dev: true
-
/caniuse-lite@1.0.30001549:
resolution: {integrity: sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA==}
dev: true
@@ -1060,6 +1192,10 @@ packages:
supports-color: 7.2.0
dev: true
+ /chardet@0.7.0:
+ resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==}
+ dev: true
+
/chart.js@4.4.0:
resolution: {integrity: sha512-vQEj6d+z0dcsKLlQvbKIMYFHd3t8W/7L2vfJIbYcfyPcRx92CsHqECpueN8qVGNlKyDcr5wBrYAYKnfu/9Q1hQ==}
engines: {pnpm: '>=7'}
@@ -1088,6 +1224,37 @@ packages:
fsevents: 2.3.3
dev: true
+ /cli-cursor@3.1.0:
+ resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==}
+ engines: {node: '>=8'}
+ dependencies:
+ restore-cursor: 3.1.0
+ dev: true
+
+ /cli-spinners@2.9.1:
+ resolution: {integrity: sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==}
+ engines: {node: '>=6'}
+ dev: true
+
+ /cli-width@3.0.0:
+ resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==}
+ engines: {node: '>= 10'}
+ dev: true
+
+ /cliui@7.0.4:
+ resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==}
+ dependencies:
+ string-width: 4.2.3
+ strip-ansi: 6.0.1
+ wrap-ansi: 7.0.0
+ dev: true
+
+ /clone@1.0.4:
+ resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==}
+ engines: {node: '>=0.8'}
+ requiresBuild: true
+ dev: true
+
/code-red@1.0.4:
resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==}
dependencies:
@@ -1108,25 +1275,62 @@ packages:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
dev: true
+ /combined-stream@1.0.8:
+ resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
+ engines: {node: '>= 0.8'}
+ dependencies:
+ delayed-stream: 1.0.0
+ dev: true
+
/commander@10.0.1:
resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==}
engines: {node: '>=14'}
dev: true
- /commander@11.1.0:
- resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==}
- engines: {node: '>=16'}
- dev: true
-
/commander@4.1.1:
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
engines: {node: '>= 6'}
dev: true
+ /commander@8.3.0:
+ resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==}
+ engines: {node: '>= 12'}
+ dev: true
+
+ /compare-versions@4.1.4:
+ resolution: {integrity: sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==}
+ dev: true
+
/concat-map@0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
dev: true
+ /concurrently@6.5.1:
+ resolution: {integrity: sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==}
+ engines: {node: '>=10.0.0'}
+ hasBin: true
+ dependencies:
+ chalk: 4.1.2
+ date-fns: 2.30.0
+ lodash: 4.17.21
+ rxjs: 6.6.7
+ spawn-command: 0.0.2-1
+ supports-color: 8.1.1
+ tree-kill: 1.2.2
+ yargs: 16.2.0
+ dev: true
+
+ /consola@2.15.3:
+ resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==}
+ dev: true
+
+ /console.table@0.10.0:
+ resolution: {integrity: sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==}
+ engines: {node: '> 0.10'}
+ dependencies:
+ easy-table: 1.1.0
+ dev: true
+
/cookie@0.5.0:
resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==}
engines: {node: '>= 0.6'}
@@ -1173,6 +1377,13 @@ packages:
d3-interpolate: 3.0.1
dev: false
+ /date-fns@2.30.0:
+ resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==}
+ engines: {node: '>=0.11'}
+ dependencies:
+ '@babel/runtime': 7.23.2
+ dev: true
+
/dayjs@1.11.10:
resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==}
dev: false
@@ -1203,6 +1414,18 @@ packages:
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
engines: {node: '>=0.10.0'}
+ /defaults@1.0.4:
+ resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==}
+ requiresBuild: true
+ dependencies:
+ clone: 1.0.4
+ dev: true
+
+ /delayed-stream@1.0.0:
+ resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
+ engines: {node: '>=0.4.0'}
+ dev: true
+
/dequal@2.0.3:
resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
engines: {node: '>=6'}
@@ -1247,10 +1470,20 @@ packages:
engines: {node: '>=12'}
dev: true
+ /easy-table@1.1.0:
+ resolution: {integrity: sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==}
+ optionalDependencies:
+ wcwidth: 1.0.1
+ dev: true
+
/electron-to-chromium@1.4.554:
resolution: {integrity: sha512-Q0umzPJjfBrrj8unkONTgbKQXzXRrH7sVV7D9ea2yBV3Oaogz991yhbpfvo2LMNkJItmruXTEzVpP9cp7vaIiQ==}
dev: true
+ /emoji-regex@8.0.0:
+ resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
+ dev: true
+
/es6-promise@3.3.1:
resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==}
dev: true
@@ -1289,6 +1522,11 @@ packages:
engines: {node: '>=6'}
dev: true
+ /escape-string-regexp@1.0.5:
+ resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==}
+ engines: {node: '>=0.8.0'}
+ dev: true
+
/escape-string-regexp@4.0.0:
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
engines: {node: '>=10'}
@@ -1451,6 +1689,15 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ /external-editor@3.1.0:
+ resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==}
+ engines: {node: '>=4'}
+ dependencies:
+ chardet: 0.7.0
+ iconv-lite: 0.4.24
+ tmp: 0.0.33
+ dev: true
+
/fast-deep-equal@3.1.3:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
dev: true
@@ -1474,12 +1721,23 @@ packages:
resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
dev: true
+ /fast-safe-stringify@2.1.1:
+ resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==}
+ dev: true
+
/fastq@1.15.0:
resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==}
dependencies:
reusify: 1.0.4
dev: true
+ /figures@3.2.0:
+ resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==}
+ engines: {node: '>=8'}
+ dependencies:
+ escape-string-regexp: 1.0.5
+ dev: true
+
/file-entry-cache@6.0.1:
resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
engines: {node: ^10.12.0 || >=12.0.0}
@@ -1535,13 +1793,32 @@ packages:
mini-svg-data-uri: 1.4.4
dev: false
+ /follow-redirects@1.15.3:
+ resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==}
+ engines: {node: '>=4.0'}
+ peerDependencies:
+ debug: '*'
+ peerDependenciesMeta:
+ debug:
+ optional: true
+ dev: true
+
+ /form-data@4.0.0:
+ resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
+ engines: {node: '>= 6'}
+ dependencies:
+ asynckit: 0.4.0
+ combined-stream: 1.0.8
+ mime-types: 2.1.35
+ dev: true
+
/fraction.js@4.3.7:
resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==}
dev: true
- /fs-extra@11.1.1:
- resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==}
- engines: {node: '>=14.14'}
+ /fs-extra@10.1.0:
+ resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==}
+ engines: {node: '>=12'}
dependencies:
graceful-fs: 4.2.11
jsonfile: 6.1.0
@@ -1559,6 +1836,11 @@ packages:
requiresBuild: true
optional: true
+ /get-caller-file@2.0.5:
+ resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
+ engines: {node: 6.* || 8.* || >= 10.*}
+ dev: true
+
/get-func-name@2.0.2:
resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==}
dev: true
@@ -1643,19 +1925,6 @@ packages:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
dev: true
- /handlebars@4.7.8:
- resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==}
- engines: {node: '>=0.4.7'}
- hasBin: true
- dependencies:
- minimist: 1.2.8
- neo-async: 2.6.2
- source-map: 0.6.1
- wordwrap: 1.0.0
- optionalDependencies:
- uglify-js: 3.17.4
- dev: true
-
/has-flag@4.0.0:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
@@ -1666,6 +1935,17 @@ packages:
engines: {node: '>= 0.4.0'}
dev: true
+ /iconv-lite@0.4.24:
+ resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
+ engines: {node: '>=0.10.0'}
+ dependencies:
+ safer-buffer: 2.1.2
+ dev: true
+
+ /ieee754@1.2.1:
+ resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
+ dev: true
+
/ignore@5.2.4:
resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==}
engines: {node: '>= 4'}
@@ -1699,6 +1979,27 @@ packages:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
dev: true
+ /inquirer@8.2.5:
+ resolution: {integrity: sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==}
+ engines: {node: '>=12.0.0'}
+ dependencies:
+ ansi-escapes: 4.3.2
+ chalk: 4.1.2
+ cli-cursor: 3.1.0
+ cli-width: 3.0.0
+ external-editor: 3.1.0
+ figures: 3.2.0
+ lodash: 4.17.21
+ mute-stream: 0.0.8
+ ora: 5.4.1
+ run-async: 2.4.1
+ rxjs: 7.8.0
+ string-width: 4.2.3
+ strip-ansi: 6.0.1
+ through: 2.3.8
+ wrap-ansi: 7.0.0
+ dev: true
+
/is-binary-path@2.1.0:
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
engines: {node: '>=8'}
@@ -1717,6 +2018,11 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ /is-fullwidth-code-point@3.0.0:
+ resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
+ engines: {node: '>=8'}
+ dev: true
+
/is-glob@4.0.3:
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
engines: {node: '>=0.10.0'}
@@ -1724,6 +2030,11 @@ packages:
is-extglob: 2.1.1
dev: true
+ /is-interactive@1.0.0:
+ resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==}
+ engines: {node: '>=8'}
+ dev: true
+
/is-number@7.0.0:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
@@ -1739,10 +2050,20 @@ packages:
dependencies:
'@types/estree': 1.0.2
+ /is-unicode-supported@0.1.0:
+ resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==}
+ engines: {node: '>=10'}
+ dev: true
+
/isexe@2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
dev: true
+ /iterare@1.2.1:
+ resolution: {integrity: sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==}
+ engines: {node: '>=6'}
+ dev: true
+
/jiti@1.20.0:
resolution: {integrity: sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==}
hasBin: true
@@ -1759,14 +2080,6 @@ packages:
resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
dev: true
- /json-schema-ref-parser@9.0.9:
- resolution: {integrity: sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==}
- engines: {node: '>=10'}
- deprecated: Please switch to @apidevtools/json-schema-ref-parser
- dependencies:
- '@apidevtools/json-schema-ref-parser': 9.0.9
- dev: true
-
/json-schema-traverse@0.4.1:
resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}
dev: true
@@ -1845,6 +2158,18 @@ packages:
resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
dev: true
+ /lodash@4.17.21:
+ resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
+ dev: true
+
+ /log-symbols@4.1.0:
+ resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==}
+ engines: {node: '>=10'}
+ dependencies:
+ chalk: 4.1.2
+ is-unicode-supported: 0.1.0
+ dev: true
+
/loupe@2.3.7:
resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==}
dependencies:
@@ -1887,11 +2212,28 @@ packages:
picomatch: 2.3.1
dev: true
+ /mime-db@1.52.0:
+ resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
+ engines: {node: '>= 0.6'}
+ dev: true
+
+ /mime-types@2.1.35:
+ resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
+ engines: {node: '>= 0.6'}
+ dependencies:
+ mime-db: 1.52.0
+ dev: true
+
/mime@3.0.0:
resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==}
engines: {node: '>=10.0.0'}
hasBin: true
+ /mimic-fn@2.1.0:
+ resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}
+ engines: {node: '>=6'}
+ dev: true
+
/min-indent@1.0.1:
resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==}
engines: {node: '>=4'}
@@ -1945,6 +2287,10 @@ packages:
/ms@2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
+ /mute-stream@0.0.8:
+ resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==}
+ dev: true
+
/mz@2.7.0:
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
dependencies:
@@ -1962,8 +2308,16 @@ packages:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
dev: true
- /neo-async@2.6.2:
- resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
+ /node-fetch@2.7.0:
+ resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}
+ engines: {node: 4.x || >=6.0.0}
+ peerDependencies:
+ encoding: ^0.1.0
+ peerDependenciesMeta:
+ encoding:
+ optional: true
+ dependencies:
+ whatwg-url: 5.0.0
dev: true
/node-releases@2.0.13:
@@ -1996,15 +2350,11 @@ packages:
wrappy: 1.0.2
dev: true
- /openapi-typescript-codegen@0.25.0:
- resolution: {integrity: sha512-nN/TnIcGbP58qYgwEEy5FrAAjePcYgfMaCe3tsmYyTgI3v4RR9v8os14L+LEWDvV50+CmqiyTzRkKKtJeb6Ybg==}
- hasBin: true
+ /onetime@5.1.2:
+ resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
+ engines: {node: '>=6'}
dependencies:
- camelcase: 6.3.0
- commander: 11.1.0
- fs-extra: 11.1.1
- handlebars: 4.7.8
- json-schema-ref-parser: 9.0.9
+ mimic-fn: 2.1.0
dev: true
/optionator@0.9.3:
@@ -2019,6 +2369,26 @@ packages:
type-check: 0.4.0
dev: true
+ /ora@5.4.1:
+ resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==}
+ engines: {node: '>=10'}
+ dependencies:
+ bl: 4.1.0
+ chalk: 4.1.2
+ cli-cursor: 3.1.0
+ cli-spinners: 2.9.1
+ is-interactive: 1.0.0
+ is-unicode-supported: 0.1.0
+ log-symbols: 4.1.0
+ strip-ansi: 6.0.1
+ wcwidth: 1.0.1
+ dev: true
+
+ /os-tmpdir@1.0.2:
+ resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==}
+ engines: {node: '>=0.10.0'}
+ dev: true
+
/p-limit@3.1.0:
resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
engines: {node: '>=10'}
@@ -2066,6 +2436,10 @@ packages:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
dev: true
+ /path-to-regexp@3.2.0:
+ resolution: {integrity: sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==}
+ dev: true
+
/path-type@4.0.0:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
@@ -2283,6 +2657,15 @@ packages:
pify: 2.3.0
dev: true
+ /readable-stream@3.6.2:
+ resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
+ engines: {node: '>= 6'}
+ dependencies:
+ inherits: 2.0.4
+ string_decoder: 1.3.0
+ util-deprecate: 1.0.2
+ dev: true
+
/readdirp@3.6.0:
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
engines: {node: '>=8.10.0'}
@@ -2290,9 +2673,17 @@ packages:
picomatch: 2.3.1
dev: true
+ /reflect-metadata@0.1.13:
+ resolution: {integrity: sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==}
+ dev: true
+
/regenerator-runtime@0.14.0:
resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==}
- dev: false
+
+ /require-directory@2.1.1:
+ resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
+ engines: {node: '>=0.10.0'}
+ dev: true
/resolve-from@4.0.0:
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
@@ -2308,6 +2699,14 @@ packages:
supports-preserve-symlinks-flag: 1.0.0
dev: true
+ /restore-cursor@3.1.0:
+ resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==}
+ engines: {node: '>=8'}
+ dependencies:
+ onetime: 5.1.2
+ signal-exit: 3.0.7
+ dev: true
+
/reusify@1.0.4:
resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
@@ -2334,18 +2733,44 @@ packages:
optionalDependencies:
fsevents: 2.3.3
+ /run-async@2.4.1:
+ resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==}
+ engines: {node: '>=0.12.0'}
+ dev: true
+
/run-parallel@1.2.0:
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
dependencies:
queue-microtask: 1.2.3
dev: true
+ /rxjs@6.6.7:
+ resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==}
+ engines: {npm: '>=2.0.0'}
+ dependencies:
+ tslib: 1.14.1
+ dev: true
+
+ /rxjs@7.8.0:
+ resolution: {integrity: sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==}
+ dependencies:
+ tslib: 2.6.2
+ dev: true
+
/sade@1.8.1:
resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==}
engines: {node: '>=6'}
dependencies:
mri: 1.2.0
+ /safe-buffer@5.2.1:
+ resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
+ dev: true
+
+ /safer-buffer@2.1.2:
+ resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
+ dev: true
+
/sander@0.5.1:
resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==}
dependencies:
@@ -2382,6 +2807,10 @@ packages:
resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
dev: true
+ /signal-exit@3.0.7:
+ resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
+ dev: true
+
/sirv@2.0.3:
resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==}
engines: {node: '>= 10'}
@@ -2409,9 +2838,8 @@ packages:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
- /source-map@0.6.1:
- resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
- engines: {node: '>=0.10.0'}
+ /spawn-command@0.0.2-1:
+ resolution: {integrity: sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==}
dev: true
/stackback@0.0.2:
@@ -2422,6 +2850,21 @@ packages:
resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==}
dev: true
+ /string-width@4.2.3:
+ resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
+ engines: {node: '>=8'}
+ dependencies:
+ emoji-regex: 8.0.0
+ is-fullwidth-code-point: 3.0.0
+ strip-ansi: 6.0.1
+ dev: true
+
+ /string_decoder@1.3.0:
+ resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
+ dependencies:
+ safe-buffer: 5.2.1
+ dev: true
+
/strip-ansi@6.0.1:
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
engines: {node: '>=8'}
@@ -2468,6 +2911,13 @@ packages:
has-flag: 4.0.0
dev: true
+ /supports-color@8.1.1:
+ resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}
+ engines: {node: '>=10'}
+ dependencies:
+ has-flag: 4.0.0
+ dev: true
+
/supports-preserve-symlinks-flag@1.0.0:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
@@ -2765,6 +3215,10 @@ packages:
any-promise: 1.3.0
dev: true
+ /through@2.3.8:
+ resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
+ dev: true
+
/tiny-glob@0.2.9:
resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==}
dependencies:
@@ -2785,6 +3239,13 @@ packages:
engines: {node: '>=14.0.0'}
dev: true
+ /tmp@0.0.33:
+ resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==}
+ engines: {node: '>=0.6.0'}
+ dependencies:
+ os-tmpdir: 1.0.2
+ dev: true
+
/to-regex-range@5.0.1:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'}
@@ -2796,6 +3257,15 @@ packages:
resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
engines: {node: '>=6'}
+ /tr46@0.0.3:
+ resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
+ dev: true
+
+ /tree-kill@1.2.2:
+ resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==}
+ hasBin: true
+ dev: true
+
/ts-api-utils@1.0.3(typescript@5.2.2):
resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==}
engines: {node: '>=16.13.0'}
@@ -2813,6 +3283,18 @@ packages:
resolution: {integrity: sha512-tL0w8U/pgaacOmkb9fRlYzWEUDCfVjjv9dD4wHTgZ61MjhuMt46VNWTG747NqW6vRzoWIKABVhFSOJ82FvXrfA==}
dev: false
+ /tslib@1.14.1:
+ resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
+ dev: true
+
+ /tslib@2.0.3:
+ resolution: {integrity: sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==}
+ dev: true
+
+ /tslib@2.5.0:
+ resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==}
+ dev: true
+
/tslib@2.6.2:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
dev: true
@@ -2834,6 +3316,11 @@ packages:
engines: {node: '>=10'}
dev: true
+ /type-fest@0.21.3:
+ resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==}
+ engines: {node: '>=10'}
+ dev: true
+
/typescript@5.2.2:
resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==}
engines: {node: '>=14.17'}
@@ -2844,13 +3331,12 @@ packages:
resolution: {integrity: sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==}
dev: true
- /uglify-js@3.17.4:
- resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==}
- engines: {node: '>=0.8.0'}
- hasBin: true
- requiresBuild: true
+ /uid@2.0.1:
+ resolution: {integrity: sha512-PF+1AnZgycpAIEmNtjxGBVmKbZAQguaa4pBUq6KNaGEcpzZ2klCNZLM34tsjp76maN00TttiiUf6zkIBpJQm2A==}
+ engines: {node: '>=8'}
+ dependencies:
+ '@lukeed/csprng': 1.1.0
dev: true
- optional: true
/undici-types@5.25.3:
resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==}
@@ -3029,6 +3515,23 @@ packages:
- terser
dev: true
+ /wcwidth@1.0.1:
+ resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
+ dependencies:
+ defaults: 1.0.4
+ dev: true
+
+ /webidl-conversions@3.0.1:
+ resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
+ dev: true
+
+ /whatwg-url@5.0.0:
+ resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
+ dependencies:
+ tr46: 0.0.3
+ webidl-conversions: 3.0.1
+ dev: true
+
/which@2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'}
@@ -3046,14 +3549,24 @@ packages:
stackback: 0.0.2
dev: true
- /wordwrap@1.0.0:
- resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==}
+ /wrap-ansi@7.0.0:
+ resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
+ engines: {node: '>=10'}
+ dependencies:
+ ansi-styles: 4.3.0
+ string-width: 4.2.3
+ strip-ansi: 6.0.1
dev: true
/wrappy@1.0.2:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
dev: true
+ /y18n@5.0.8:
+ resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
+ engines: {node: '>=10'}
+ dev: true
+
/yallist@4.0.0:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
dev: true
@@ -3068,6 +3581,24 @@ packages:
engines: {node: '>= 14'}
dev: true
+ /yargs-parser@20.2.9:
+ resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==}
+ engines: {node: '>=10'}
+ dev: true
+
+ /yargs@16.2.0:
+ resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==}
+ engines: {node: '>=10'}
+ dependencies:
+ cliui: 7.0.4
+ escalade: 3.1.1
+ get-caller-file: 2.0.5
+ require-directory: 2.1.1
+ string-width: 4.2.3
+ y18n: 5.0.8
+ yargs-parser: 20.2.9
+ dev: true
+
/yocto-queue@0.1.0:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
@@ -3081,9 +3612,3 @@ packages:
/zod@3.22.4:
resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==}
dev: false
-
- github.com/michaelhthomas/firefly-iii-typescript-sdk-fetch/70f794d824bd19dfaaa482710ef40e76984b8910:
- resolution: {tarball: https://codeload.github.com/michaelhthomas/firefly-iii-typescript-sdk-fetch/tar.gz/70f794d824bd19dfaaa482710ef40e76984b8910}
- name: firefly-iii-typescript-sdk-fetch
- version: 1.0.0
- dev: false
diff --git a/src/app.html b/src/app.html
index 297699f..e3c1ea0 100644
--- a/src/app.html
+++ b/src/app.html
@@ -2,9 +2,19 @@
-
%sveltekit.head%
+
+
+
+
+
+
+
+
+
+
+
> {
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/about`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => SystemInfoFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns general system information and versions of the (supporting) software.
+ * System information end point.
+ */
+ async getAbout(requestParameters: GetAboutRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getAboutRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Firefly III has one endpoint for its various cron related tasks. Send a GET to this endpoint to run the cron. The cron requires the CLI token to be present. The cron job will fire for all users.
+ * Cron job endpoint
+ */
+ async getCronRaw(requestParameters: GetCronRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.cliToken === null || requestParameters.cliToken === undefined) {
+ throw new runtime.RequiredError('cliToken','Required parameter requestParameters.cliToken was null or undefined when calling getCron.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.date !== undefined) {
+ queryParameters['date'] = (requestParameters.date as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.force !== undefined) {
+ queryParameters['force'] = requestParameters.force;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/cron/{cliToken}`.replace(`{${"cliToken"}}`, encodeURIComponent(String(requestParameters.cliToken))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CronResultFromJSON(jsonValue));
+ }
+
+ /**
+ * Firefly III has one endpoint for its various cron related tasks. Send a GET to this endpoint to run the cron. The cron requires the CLI token to be present. The cron job will fire for all users.
+ * Cron job endpoint
+ */
+ async getCron(requestParameters: GetCronRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getCronRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns the currently authenticated user.
+ * Currently authenticated user endpoint.
+ */
+ async getCurrentUserRaw(requestParameters: GetCurrentUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/about/user`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns the currently authenticated user.
+ * Currently authenticated user endpoint.
+ */
+ async getCurrentUser(requestParameters: GetCurrentUserRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getCurrentUserRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/src/lib/api/apis/AccountsApi.ts b/src/lib/api/apis/AccountsApi.ts
new file mode 100644
index 0000000..f31bec3
--- /dev/null
+++ b/src/lib/api/apis/AccountsApi.ts
@@ -0,0 +1,576 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AccountArray,
+ AccountSingle,
+ AccountStore,
+ AccountTypeFilter,
+ AccountUpdate,
+ AttachmentArray,
+ BadRequest,
+ InternalException,
+ NotFound,
+ PiggyBankArray,
+ TransactionArray,
+ TransactionTypeFilter,
+ Unauthenticated,
+ ValidationError,
+} from '../models/index';
+import {
+ AccountArrayFromJSON,
+ AccountArrayToJSON,
+ AccountSingleFromJSON,
+ AccountSingleToJSON,
+ AccountStoreFromJSON,
+ AccountStoreToJSON,
+ AccountTypeFilterFromJSON,
+ AccountTypeFilterToJSON,
+ AccountUpdateFromJSON,
+ AccountUpdateToJSON,
+ AttachmentArrayFromJSON,
+ AttachmentArrayToJSON,
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ PiggyBankArrayFromJSON,
+ PiggyBankArrayToJSON,
+ TransactionArrayFromJSON,
+ TransactionArrayToJSON,
+ TransactionTypeFilterFromJSON,
+ TransactionTypeFilterToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+ ValidationErrorFromJSON,
+ ValidationErrorToJSON,
+} from '../models/index';
+
+export interface DeleteAccountRequest {
+ id: string;
+ xTraceId?: string;
+}
+
+export interface GetAccountRequest {
+ id: string;
+ xTraceId?: string;
+ date?: Date;
+}
+
+export interface ListAccountRequest {
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ date?: Date;
+ type?: AccountTypeFilter;
+}
+
+export interface ListAttachmentByAccountRequest {
+ id: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListPiggyBankByAccountRequest {
+ id: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListTransactionByAccountRequest {
+ id: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ start?: Date;
+ end?: Date;
+ type?: TransactionTypeFilter;
+}
+
+export interface StoreAccountRequest {
+ accountStore: AccountStore;
+ xTraceId?: string;
+}
+
+export interface UpdateAccountRequest {
+ id: string;
+ accountUpdate: AccountUpdate;
+ xTraceId?: string;
+}
+
+/**
+ *
+ */
+export class AccountsApi extends runtime.BaseAPI {
+
+ /**
+ * Will permanently delete an account. Any associated transactions and piggy banks are ALSO deleted. Cannot be recovered from.
+ * Permanently delete account.
+ */
+ async deleteAccountRaw(requestParameters: DeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteAccount.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/accounts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'DELETE',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Will permanently delete an account. Any associated transactions and piggy banks are ALSO deleted. Cannot be recovered from.
+ * Permanently delete account.
+ */
+ async deleteAccount(requestParameters: DeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.deleteAccountRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * Returns a single account by its ID.
+ * Get single account.
+ */
+ async getAccountRaw(requestParameters: GetAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getAccount.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.date !== undefined) {
+ queryParameters['date'] = (requestParameters.date as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/accounts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns a single account by its ID.
+ * Get single account.
+ */
+ async getAccount(requestParameters: GetAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getAccountRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint returns a list of all the accounts owned by the authenticated user.
+ * List all accounts.
+ */
+ async listAccountRaw(requestParameters: ListAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.date !== undefined) {
+ queryParameters['date'] = (requestParameters.date as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/accounts`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * This endpoint returns a list of all the accounts owned by the authenticated user.
+ * List all accounts.
+ */
+ async listAccount(requestParameters: ListAccountRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listAccountRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Lists all attachments.
+ * Lists all attachments.
+ */
+ async listAttachmentByAccountRaw(requestParameters: ListAttachmentByAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listAttachmentByAccount.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/accounts/{id}/attachments`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * Lists all attachments.
+ * Lists all attachments.
+ */
+ async listAttachmentByAccount(requestParameters: ListAttachmentByAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listAttachmentByAccountRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint returns a list of all the piggy banks connected to the account.
+ * List all piggy banks related to the account.
+ */
+ async listPiggyBankByAccountRaw(requestParameters: ListPiggyBankByAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listPiggyBankByAccount.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/accounts/{id}/piggy-banks`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => PiggyBankArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * This endpoint returns a list of all the piggy banks connected to the account.
+ * List all piggy banks related to the account.
+ */
+ async listPiggyBankByAccount(requestParameters: ListPiggyBankByAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listPiggyBankByAccountRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint returns a list of all the transactions connected to the account.
+ * List all transactions related to the account.
+ */
+ async listTransactionByAccountRaw(requestParameters: ListTransactionByAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listTransactionByAccount.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/accounts/{id}/transactions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => TransactionArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * This endpoint returns a list of all the transactions connected to the account.
+ * List all transactions related to the account.
+ */
+ async listTransactionByAccount(requestParameters: ListTransactionByAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTransactionByAccountRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Creates a new account. The data required can be submitted as a JSON body or as a list of parameters (in key=value pairs, like a webform).
+ * Create new account.
+ */
+ async storeAccountRaw(requestParameters: StoreAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.accountStore === null || requestParameters.accountStore === undefined) {
+ throw new runtime.RequiredError('accountStore','Required parameter requestParameters.accountStore was null or undefined when calling storeAccount.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/accounts`,
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AccountStoreToJSON(requestParameters.accountStore),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Creates a new account. The data required can be submitted as a JSON body or as a list of parameters (in key=value pairs, like a webform).
+ * Create new account.
+ */
+ async storeAccount(requestParameters: StoreAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.storeAccountRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Used to update a single account. All fields that are not submitted will be cleared (set to NULL). The model will tell you which fields are mandatory.
+ * Update existing account.
+ */
+ async updateAccountRaw(requestParameters: UpdateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateAccount.');
+ }
+
+ if (requestParameters.accountUpdate === null || requestParameters.accountUpdate === undefined) {
+ throw new runtime.RequiredError('accountUpdate','Required parameter requestParameters.accountUpdate was null or undefined when calling updateAccount.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/accounts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'PUT',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AccountUpdateToJSON(requestParameters.accountUpdate),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Used to update a single account. All fields that are not submitted will be cleared (set to NULL). The model will tell you which fields are mandatory.
+ * Update existing account.
+ */
+ async updateAccount(requestParameters: UpdateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateAccountRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/src/lib/api/apis/AttachmentsApi.ts b/src/lib/api/apis/AttachmentsApi.ts
new file mode 100644
index 0000000..cf9f5da
--- /dev/null
+++ b/src/lib/api/apis/AttachmentsApi.ts
@@ -0,0 +1,450 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AttachmentArray,
+ AttachmentSingle,
+ AttachmentStore,
+ AttachmentUpdate,
+ BadRequest,
+ InternalException,
+ NotFound,
+ Unauthenticated,
+ ValidationError,
+} from '../models/index';
+import {
+ AttachmentArrayFromJSON,
+ AttachmentArrayToJSON,
+ AttachmentSingleFromJSON,
+ AttachmentSingleToJSON,
+ AttachmentStoreFromJSON,
+ AttachmentStoreToJSON,
+ AttachmentUpdateFromJSON,
+ AttachmentUpdateToJSON,
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+ ValidationErrorFromJSON,
+ ValidationErrorToJSON,
+} from '../models/index';
+
+export interface DeleteAttachmentRequest {
+ id: string;
+ xTraceId?: string;
+}
+
+export interface DownloadAttachmentRequest {
+ id: string;
+ xTraceId?: string;
+}
+
+export interface GetAttachmentRequest {
+ id: string;
+ xTraceId?: string;
+}
+
+export interface ListAttachmentRequest {
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface StoreAttachmentRequest {
+ attachmentStore: AttachmentStore;
+ xTraceId?: string;
+}
+
+export interface UpdateAttachmentRequest {
+ id: string;
+ attachmentUpdate: AttachmentUpdate;
+ xTraceId?: string;
+}
+
+export interface UploadAttachmentRequest {
+ id: string;
+ xTraceId?: string;
+ body?: Blob;
+}
+
+/**
+ *
+ */
+export class AttachmentsApi extends runtime.BaseAPI {
+
+ /**
+ * With this endpoint you delete an attachment, including any stored file data.
+ * Delete an attachment.
+ */
+ async deleteAttachmentRaw(requestParameters: DeleteAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteAttachment.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/attachments/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'DELETE',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * With this endpoint you delete an attachment, including any stored file data.
+ * Delete an attachment.
+ */
+ async deleteAttachment(requestParameters: DeleteAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.deleteAttachmentRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * This endpoint allows you to download the binary content of a transaction. It will be sent to you as a download, using the content type \"application/octet-stream\" and content disposition \"attachment; filename=example.pdf\".
+ * Download a single attachment.
+ */
+ async downloadAttachmentRaw(requestParameters: DownloadAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling downloadAttachment.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/attachments/{id}/download`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * This endpoint allows you to download the binary content of a transaction. It will be sent to you as a download, using the content type \"application/octet-stream\" and content disposition \"attachment; filename=example.pdf\".
+ * Download a single attachment.
+ */
+ async downloadAttachment(requestParameters: DownloadAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.downloadAttachmentRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get a single attachment. This endpoint only returns the available metadata for the attachment. Actual file data is handled in two other endpoints (see below).
+ * Get a single attachment.
+ */
+ async getAttachmentRaw(requestParameters: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getAttachment.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/attachments/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Get a single attachment. This endpoint only returns the available metadata for the attachment. Actual file data is handled in two other endpoints (see below).
+ * Get a single attachment.
+ */
+ async getAttachment(requestParameters: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getAttachmentRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint lists all attachments.
+ * List all attachments.
+ */
+ async listAttachmentRaw(requestParameters: ListAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/attachments`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * This endpoint lists all attachments.
+ * List all attachments.
+ */
+ async listAttachment(requestParameters: ListAttachmentRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listAttachmentRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Creates a new attachment. The data required can be submitted as a JSON body or as a list of parameters. You cannot use this endpoint to upload the actual file data (see below). This endpoint only creates the attachment object.
+ * Store a new attachment.
+ */
+ async storeAttachmentRaw(requestParameters: StoreAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.attachmentStore === null || requestParameters.attachmentStore === undefined) {
+ throw new runtime.RequiredError('attachmentStore','Required parameter requestParameters.attachmentStore was null or undefined when calling storeAttachment.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/attachments`,
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AttachmentStoreToJSON(requestParameters.attachmentStore),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Creates a new attachment. The data required can be submitted as a JSON body or as a list of parameters. You cannot use this endpoint to upload the actual file data (see below). This endpoint only creates the attachment object.
+ * Store a new attachment.
+ */
+ async storeAttachment(requestParameters: StoreAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.storeAttachmentRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Update the meta data for an existing attachment. This endpoint does not allow you to upload or download data. For that, see below.
+ * Update existing attachment.
+ */
+ async updateAttachmentRaw(requestParameters: UpdateAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateAttachment.');
+ }
+
+ if (requestParameters.attachmentUpdate === null || requestParameters.attachmentUpdate === undefined) {
+ throw new runtime.RequiredError('attachmentUpdate','Required parameter requestParameters.attachmentUpdate was null or undefined when calling updateAttachment.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/attachments/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'PUT',
+ headers: headerParameters,
+ query: queryParameters,
+ body: AttachmentUpdateToJSON(requestParameters.attachmentUpdate),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Update the meta data for an existing attachment. This endpoint does not allow you to upload or download data. For that, see below.
+ * Update existing attachment.
+ */
+ async updateAttachment(requestParameters: UpdateAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateAttachmentRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Use this endpoint to upload (and possible overwrite) the file contents of an attachment. Simply put the entire file in the body as binary data.
+ * Upload an attachment.
+ */
+ async uploadAttachmentRaw(requestParameters: UploadAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling uploadAttachment.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/octet-stream';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/attachments/{id}/upload`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: requestParameters.body as any,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Use this endpoint to upload (and possible overwrite) the file contents of an attachment. Simply put the entire file in the body as binary data.
+ * Upload an attachment.
+ */
+ async uploadAttachment(requestParameters: UploadAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.uploadAttachmentRaw(requestParameters, initOverrides);
+ }
+
+}
diff --git a/src/lib/api/apis/AutocompleteApi.ts b/src/lib/api/apis/AutocompleteApi.ts
new file mode 100644
index 0000000..e6359c1
--- /dev/null
+++ b/src/lib/api/apis/AutocompleteApi.ts
@@ -0,0 +1,1012 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AccountTypeFilter,
+ AutocompleteAccount,
+ AutocompleteBill,
+ AutocompleteBudget,
+ AutocompleteCategory,
+ AutocompleteCurrency,
+ AutocompleteCurrencyCode,
+ AutocompleteObjectGroup,
+ AutocompletePiggy,
+ AutocompletePiggyBalance,
+ AutocompleteRecurrence,
+ AutocompleteRule,
+ AutocompleteRuleGroup,
+ AutocompleteTag,
+ AutocompleteTransaction,
+ AutocompleteTransactionID,
+ AutocompleteTransactionType,
+ BadRequest,
+ InternalException,
+ NotFound,
+ Unauthenticated,
+} from '../models/index';
+import {
+ AccountTypeFilterFromJSON,
+ AccountTypeFilterToJSON,
+ AutocompleteAccountFromJSON,
+ AutocompleteAccountToJSON,
+ AutocompleteBillFromJSON,
+ AutocompleteBillToJSON,
+ AutocompleteBudgetFromJSON,
+ AutocompleteBudgetToJSON,
+ AutocompleteCategoryFromJSON,
+ AutocompleteCategoryToJSON,
+ AutocompleteCurrencyFromJSON,
+ AutocompleteCurrencyToJSON,
+ AutocompleteCurrencyCodeFromJSON,
+ AutocompleteCurrencyCodeToJSON,
+ AutocompleteObjectGroupFromJSON,
+ AutocompleteObjectGroupToJSON,
+ AutocompletePiggyFromJSON,
+ AutocompletePiggyToJSON,
+ AutocompletePiggyBalanceFromJSON,
+ AutocompletePiggyBalanceToJSON,
+ AutocompleteRecurrenceFromJSON,
+ AutocompleteRecurrenceToJSON,
+ AutocompleteRuleFromJSON,
+ AutocompleteRuleToJSON,
+ AutocompleteRuleGroupFromJSON,
+ AutocompleteRuleGroupToJSON,
+ AutocompleteTagFromJSON,
+ AutocompleteTagToJSON,
+ AutocompleteTransactionFromJSON,
+ AutocompleteTransactionToJSON,
+ AutocompleteTransactionIDFromJSON,
+ AutocompleteTransactionIDToJSON,
+ AutocompleteTransactionTypeFromJSON,
+ AutocompleteTransactionTypeToJSON,
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+} from '../models/index';
+
+export interface GetAccountsACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+ date?: string;
+ types?: Array;
+}
+
+export interface GetBillsACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetBudgetsACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetCategoriesACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetCurrenciesACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetCurrenciesCodeACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetObjectGroupsACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetPiggiesACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetPiggiesBalanceACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetRecurringACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetRuleGroupsACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetRulesACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetTagACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetTransactionTypesACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetTransactionsACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+export interface GetTransactionsIDACRequest {
+ xTraceId?: string;
+ query?: string;
+ limit?: number;
+}
+
+/**
+ *
+ */
+export class AutocompleteApi extends runtime.BaseAPI {
+
+ /**
+ * Returns all accounts of the user returned in a basic auto-complete array.
+ */
+ async getAccountsACRaw(requestParameters: GetAccountsACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.date !== undefined) {
+ queryParameters['date'] = requestParameters.date;
+ }
+
+ if (requestParameters.types) {
+ queryParameters['types'] = requestParameters.types.join(runtime.COLLECTION_FORMATS["csv"]);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/accounts`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteAccountFromJSON));
+ }
+
+ /**
+ * Returns all accounts of the user returned in a basic auto-complete array.
+ */
+ async getAccountsAC(requestParameters: GetAccountsACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getAccountsACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all bills of the user returned in a basic auto-complete array.
+ */
+ async getBillsACRaw(requestParameters: GetBillsACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/bills`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteBillFromJSON));
+ }
+
+ /**
+ * Returns all bills of the user returned in a basic auto-complete array.
+ */
+ async getBillsAC(requestParameters: GetBillsACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getBillsACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all budgets of the user returned in a basic auto-complete array.
+ */
+ async getBudgetsACRaw(requestParameters: GetBudgetsACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/budgets`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteBudgetFromJSON));
+ }
+
+ /**
+ * Returns all budgets of the user returned in a basic auto-complete array.
+ */
+ async getBudgetsAC(requestParameters: GetBudgetsACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getBudgetsACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all categories of the user returned in a basic auto-complete array.
+ */
+ async getCategoriesACRaw(requestParameters: GetCategoriesACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/categories`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteCategoryFromJSON));
+ }
+
+ /**
+ * Returns all categories of the user returned in a basic auto-complete array.
+ */
+ async getCategoriesAC(requestParameters: GetCategoriesACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getCategoriesACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all currencies of the user returned in a basic auto-complete array.
+ */
+ async getCurrenciesACRaw(requestParameters: GetCurrenciesACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/currencies`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteCurrencyFromJSON));
+ }
+
+ /**
+ * Returns all currencies of the user returned in a basic auto-complete array.
+ */
+ async getCurrenciesAC(requestParameters: GetCurrenciesACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getCurrenciesACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all currencies of the user returned in a basic auto-complete array. This endpoint is DEPRECATED and I suggest you DO NOT use it.
+ */
+ async getCurrenciesCodeACRaw(requestParameters: GetCurrenciesCodeACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/currencies-with-code`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteCurrencyCodeFromJSON));
+ }
+
+ /**
+ * Returns all currencies of the user returned in a basic auto-complete array. This endpoint is DEPRECATED and I suggest you DO NOT use it.
+ */
+ async getCurrenciesCodeAC(requestParameters: GetCurrenciesCodeACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getCurrenciesCodeACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all object groups of the user returned in a basic auto-complete array.
+ */
+ async getObjectGroupsACRaw(requestParameters: GetObjectGroupsACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/object-groups`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteObjectGroupFromJSON));
+ }
+
+ /**
+ * Returns all object groups of the user returned in a basic auto-complete array.
+ */
+ async getObjectGroupsAC(requestParameters: GetObjectGroupsACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getObjectGroupsACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all piggy banks of the user returned in a basic auto-complete array.
+ */
+ async getPiggiesACRaw(requestParameters: GetPiggiesACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/piggy-banks`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompletePiggyFromJSON));
+ }
+
+ /**
+ * Returns all piggy banks of the user returned in a basic auto-complete array.
+ */
+ async getPiggiesAC(requestParameters: GetPiggiesACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getPiggiesACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all piggy banks of the user returned in a basic auto-complete array complemented with balance information.
+ */
+ async getPiggiesBalanceACRaw(requestParameters: GetPiggiesBalanceACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/piggy-banks-with-balance`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompletePiggyBalanceFromJSON));
+ }
+
+ /**
+ * Returns all piggy banks of the user returned in a basic auto-complete array complemented with balance information.
+ */
+ async getPiggiesBalanceAC(requestParameters: GetPiggiesBalanceACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getPiggiesBalanceACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all recurring transactions of the user returned in a basic auto-complete array.
+ */
+ async getRecurringACRaw(requestParameters: GetRecurringACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/recurring`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteRecurrenceFromJSON));
+ }
+
+ /**
+ * Returns all recurring transactions of the user returned in a basic auto-complete array.
+ */
+ async getRecurringAC(requestParameters: GetRecurringACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getRecurringACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all rule groups of the user returned in a basic auto-complete array.
+ */
+ async getRuleGroupsACRaw(requestParameters: GetRuleGroupsACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/rule-groups`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteRuleGroupFromJSON));
+ }
+
+ /**
+ * Returns all rule groups of the user returned in a basic auto-complete array.
+ */
+ async getRuleGroupsAC(requestParameters: GetRuleGroupsACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getRuleGroupsACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all rules of the user returned in a basic auto-complete array.
+ */
+ async getRulesACRaw(requestParameters: GetRulesACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/rules`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteRuleFromJSON));
+ }
+
+ /**
+ * Returns all rules of the user returned in a basic auto-complete array.
+ */
+ async getRulesAC(requestParameters: GetRulesACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getRulesACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all tags of the user returned in a basic auto-complete array.
+ */
+ async getTagACRaw(requestParameters: GetTagACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/tags`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteTagFromJSON));
+ }
+
+ /**
+ * Returns all tags of the user returned in a basic auto-complete array.
+ */
+ async getTagAC(requestParameters: GetTagACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getTagACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all transaction types returned in a basic auto-complete array. English only.
+ */
+ async getTransactionTypesACRaw(requestParameters: GetTransactionTypesACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/transaction-types`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteTransactionTypeFromJSON));
+ }
+
+ /**
+ * Returns all transaction types returned in a basic auto-complete array. English only.
+ */
+ async getTransactionTypesAC(requestParameters: GetTransactionTypesACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getTransactionTypesACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all transaction descriptions of the user returned in a basic auto-complete array.
+ */
+ async getTransactionsACRaw(requestParameters: GetTransactionsACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/transactions`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteTransactionFromJSON));
+ }
+
+ /**
+ * Returns all transaction descriptions of the user returned in a basic auto-complete array.
+ */
+ async getTransactionsAC(requestParameters: GetTransactionsACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getTransactionsACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns all transactions, complemented with their ID, of the user returned in a basic auto-complete array. This endpoint is DEPRECATED and I suggest you DO NOT use it.
+ */
+ async getTransactionsIDACRaw(requestParameters: GetTransactionsIDACRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/autocomplete/transactions-with-id`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AutocompleteTransactionIDFromJSON));
+ }
+
+ /**
+ * Returns all transactions, complemented with their ID, of the user returned in a basic auto-complete array. This endpoint is DEPRECATED and I suggest you DO NOT use it.
+ */
+ async getTransactionsIDAC(requestParameters: GetTransactionsIDACRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getTransactionsIDACRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/src/lib/api/apis/AvailableBudgetsApi.ts b/src/lib/api/apis/AvailableBudgetsApi.ts
new file mode 100644
index 0000000..25ddc91
--- /dev/null
+++ b/src/lib/api/apis/AvailableBudgetsApi.ts
@@ -0,0 +1,168 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AvailableBudgetArray,
+ AvailableBudgetSingle,
+ BadRequest,
+ InternalException,
+ NotFound,
+ Unauthenticated,
+} from '../models/index';
+import {
+ AvailableBudgetArrayFromJSON,
+ AvailableBudgetArrayToJSON,
+ AvailableBudgetSingleFromJSON,
+ AvailableBudgetSingleToJSON,
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+} from '../models/index';
+
+export interface GetAvailableBudgetRequest {
+ id: string;
+ xTraceId?: string;
+}
+
+export interface ListAvailableBudgetRequest {
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ start?: Date;
+ end?: Date;
+}
+
+/**
+ *
+ */
+export class AvailableBudgetsApi extends runtime.BaseAPI {
+
+ /**
+ * Get a single available budget, by ID.
+ * Get a single available budget.
+ */
+ async getAvailableBudgetRaw(requestParameters: GetAvailableBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getAvailableBudget.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/available-budgets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AvailableBudgetSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Get a single available budget, by ID.
+ * Get a single available budget.
+ */
+ async getAvailableBudget(requestParameters: GetAvailableBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getAvailableBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Firefly III allows users to set the amount that is available to be budgeted in so-called \"available budgets\". For example, the user could have 1200,- available to be divided during the coming month. This amount is used on the /budgets page. This endpoint returns all of these amounts and the periods for which they are set.
+ * List all available budget amounts.
+ */
+ async listAvailableBudgetRaw(requestParameters: ListAvailableBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/available-budgets`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AvailableBudgetArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * Firefly III allows users to set the amount that is available to be budgeted in so-called \"available budgets\". For example, the user could have 1200,- available to be divided during the coming month. This amount is used on the /budgets page. This endpoint returns all of these amounts and the periods for which they are set.
+ * List all available budget amounts.
+ */
+ async listAvailableBudget(requestParameters: ListAvailableBudgetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listAvailableBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/src/lib/api/apis/BillsApi.ts b/src/lib/api/apis/BillsApi.ts
new file mode 100644
index 0000000..8d5f372
--- /dev/null
+++ b/src/lib/api/apis/BillsApi.ts
@@ -0,0 +1,558 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AttachmentArray,
+ BadRequest,
+ BillArray,
+ BillSingle,
+ BillStore,
+ BillUpdate,
+ InternalException,
+ NotFound,
+ RuleArray,
+ TransactionArray,
+ TransactionTypeFilter,
+ Unauthenticated,
+ ValidationError,
+} from '../models/index';
+import {
+ AttachmentArrayFromJSON,
+ AttachmentArrayToJSON,
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ BillArrayFromJSON,
+ BillArrayToJSON,
+ BillSingleFromJSON,
+ BillSingleToJSON,
+ BillStoreFromJSON,
+ BillStoreToJSON,
+ BillUpdateFromJSON,
+ BillUpdateToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ RuleArrayFromJSON,
+ RuleArrayToJSON,
+ TransactionArrayFromJSON,
+ TransactionArrayToJSON,
+ TransactionTypeFilterFromJSON,
+ TransactionTypeFilterToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+ ValidationErrorFromJSON,
+ ValidationErrorToJSON,
+} from '../models/index';
+
+export interface DeleteBillRequest {
+ id: string;
+ xTraceId?: string;
+}
+
+export interface GetBillRequest {
+ id: string;
+ xTraceId?: string;
+ start?: Date;
+ end?: Date;
+}
+
+export interface ListAttachmentByBillRequest {
+ id: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListBillRequest {
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ start?: Date;
+ end?: Date;
+}
+
+export interface ListRuleByBillRequest {
+ id: string;
+ xTraceId?: string;
+}
+
+export interface ListTransactionByBillRequest {
+ id: string;
+ xTraceId?: string;
+ start?: Date;
+ end?: Date;
+ type?: TransactionTypeFilter;
+}
+
+export interface StoreBillRequest {
+ billStore: BillStore;
+ xTraceId?: string;
+}
+
+export interface UpdateBillRequest {
+ id: string;
+ billUpdate: BillUpdate;
+ xTraceId?: string;
+}
+
+/**
+ *
+ */
+export class BillsApi extends runtime.BaseAPI {
+
+ /**
+ * Delete a bill. This will not delete any associated rules. Will not remove associated transactions. WILL remove all associated attachments.
+ * Delete a bill.
+ */
+ async deleteBillRaw(requestParameters: DeleteBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteBill.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/bills/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'DELETE',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Delete a bill. This will not delete any associated rules. Will not remove associated transactions. WILL remove all associated attachments.
+ * Delete a bill.
+ */
+ async deleteBill(requestParameters: DeleteBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.deleteBillRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * Get a single bill.
+ * Get a single bill.
+ */
+ async getBillRaw(requestParameters: GetBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getBill.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/bills/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BillSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Get a single bill.
+ * Get a single bill.
+ */
+ async getBill(requestParameters: GetBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getBillRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint will list all attachments linked to the bill.
+ * List all attachments uploaded to the bill.
+ */
+ async listAttachmentByBillRaw(requestParameters: ListAttachmentByBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listAttachmentByBill.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/bills/{id}/attachments`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * This endpoint will list all attachments linked to the bill.
+ * List all attachments uploaded to the bill.
+ */
+ async listAttachmentByBill(requestParameters: ListAttachmentByBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listAttachmentByBillRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint will list all the user\'s bills.
+ * List all bills.
+ */
+ async listBillRaw(requestParameters: ListBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/bills`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BillArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * This endpoint will list all the user\'s bills.
+ * List all bills.
+ */
+ async listBill(requestParameters: ListBillRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listBillRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint will list all rules that have an action to set the bill to this bill.
+ * List all rules associated with the bill.
+ */
+ async listRuleByBillRaw(requestParameters: ListRuleByBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listRuleByBill.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/bills/{id}/rules`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RuleArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * This endpoint will list all rules that have an action to set the bill to this bill.
+ * List all rules associated with the bill.
+ */
+ async listRuleByBill(requestParameters: ListRuleByBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listRuleByBillRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint will list all transactions linked to this bill.
+ * List all transactions associated with the bill.
+ */
+ async listTransactionByBillRaw(requestParameters: ListTransactionByBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listTransactionByBill.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/bills/{id}/transactions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => TransactionArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * This endpoint will list all transactions linked to this bill.
+ * List all transactions associated with the bill.
+ */
+ async listTransactionByBill(requestParameters: ListTransactionByBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTransactionByBillRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Creates a new bill. The data required can be submitted as a JSON body or as a list of parameters.
+ * Store a new bill
+ */
+ async storeBillRaw(requestParameters: StoreBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.billStore === null || requestParameters.billStore === undefined) {
+ throw new runtime.RequiredError('billStore','Required parameter requestParameters.billStore was null or undefined when calling storeBill.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/bills`,
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: BillStoreToJSON(requestParameters.billStore),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BillSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Creates a new bill. The data required can be submitted as a JSON body or as a list of parameters.
+ * Store a new bill
+ */
+ async storeBill(requestParameters: StoreBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.storeBillRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Update existing bill.
+ * Update existing bill.
+ */
+ async updateBillRaw(requestParameters: UpdateBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateBill.');
+ }
+
+ if (requestParameters.billUpdate === null || requestParameters.billUpdate === undefined) {
+ throw new runtime.RequiredError('billUpdate','Required parameter requestParameters.billUpdate was null or undefined when calling updateBill.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/bills/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'PUT',
+ headers: headerParameters,
+ query: queryParameters,
+ body: BillUpdateToJSON(requestParameters.billUpdate),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BillSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Update existing bill.
+ * Update existing bill.
+ */
+ async updateBill(requestParameters: UpdateBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateBillRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/src/lib/api/apis/BudgetsApi.ts b/src/lib/api/apis/BudgetsApi.ts
new file mode 100644
index 0000000..1115210
--- /dev/null
+++ b/src/lib/api/apis/BudgetsApi.ts
@@ -0,0 +1,972 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AttachmentArray,
+ BadRequest,
+ BudgetArray,
+ BudgetLimit,
+ BudgetLimitArray,
+ BudgetLimitSingle,
+ BudgetLimitStore,
+ BudgetSingle,
+ BudgetStore,
+ BudgetUpdate,
+ InternalException,
+ NotFound,
+ TransactionArray,
+ TransactionTypeFilter,
+ Unauthenticated,
+ ValidationError,
+} from '../models/index';
+import {
+ AttachmentArrayFromJSON,
+ AttachmentArrayToJSON,
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ BudgetArrayFromJSON,
+ BudgetArrayToJSON,
+ BudgetLimitFromJSON,
+ BudgetLimitToJSON,
+ BudgetLimitArrayFromJSON,
+ BudgetLimitArrayToJSON,
+ BudgetLimitSingleFromJSON,
+ BudgetLimitSingleToJSON,
+ BudgetLimitStoreFromJSON,
+ BudgetLimitStoreToJSON,
+ BudgetSingleFromJSON,
+ BudgetSingleToJSON,
+ BudgetStoreFromJSON,
+ BudgetStoreToJSON,
+ BudgetUpdateFromJSON,
+ BudgetUpdateToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ TransactionArrayFromJSON,
+ TransactionArrayToJSON,
+ TransactionTypeFilterFromJSON,
+ TransactionTypeFilterToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+ ValidationErrorFromJSON,
+ ValidationErrorToJSON,
+} from '../models/index';
+
+export interface DeleteBudgetRequest {
+ id: string;
+ xTraceId?: string;
+}
+
+export interface DeleteBudgetLimitRequest {
+ id: string;
+ limitId: string;
+ xTraceId?: string;
+}
+
+export interface GetBudgetRequest {
+ id: string;
+ xTraceId?: string;
+ start?: Date;
+ end?: Date;
+}
+
+export interface GetBudgetLimitRequest {
+ id: string;
+ limitId: number;
+ xTraceId?: string;
+}
+
+export interface ListAttachmentByBudgetRequest {
+ id: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListBudgetRequest {
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ start?: Date;
+ end?: Date;
+}
+
+export interface ListBudgetLimitRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+}
+
+export interface ListBudgetLimitByBudgetRequest {
+ id: string;
+ xTraceId?: string;
+ start?: Date;
+ end?: Date;
+}
+
+export interface ListTransactionByBudgetRequest {
+ id: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ start?: Date;
+ end?: Date;
+ type?: TransactionTypeFilter;
+}
+
+export interface ListTransactionByBudgetLimitRequest {
+ id: string;
+ limitId: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ type?: TransactionTypeFilter;
+}
+
+export interface StoreBudgetRequest {
+ budgetStore: BudgetStore;
+ xTraceId?: string;
+}
+
+export interface StoreBudgetLimitRequest {
+ id: string;
+ budgetLimitStore: BudgetLimitStore;
+ xTraceId?: string;
+}
+
+export interface UpdateBudgetRequest {
+ id: string;
+ budgetUpdate: BudgetUpdate;
+ xTraceId?: string;
+}
+
+export interface UpdateBudgetLimitRequest {
+ id: string;
+ limitId: string;
+ budgetLimit: BudgetLimit;
+ xTraceId?: string;
+}
+
+/**
+ *
+ */
+export class BudgetsApi extends runtime.BaseAPI {
+
+ /**
+ * Delete a budget. Transactions will not be deleted.
+ * Delete a budget.
+ */
+ async deleteBudgetRaw(requestParameters: DeleteBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteBudget.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'DELETE',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Delete a budget. Transactions will not be deleted.
+ * Delete a budget.
+ */
+ async deleteBudget(requestParameters: DeleteBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.deleteBudgetRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * Delete a budget limit.
+ * Delete a budget limit.
+ */
+ async deleteBudgetLimitRaw(requestParameters: DeleteBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteBudgetLimit.');
+ }
+
+ if (requestParameters.limitId === null || requestParameters.limitId === undefined) {
+ throw new runtime.RequiredError('limitId','Required parameter requestParameters.limitId was null or undefined when calling deleteBudgetLimit.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}/limits/{limitId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"limitId"}}`, encodeURIComponent(String(requestParameters.limitId))),
+ method: 'DELETE',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Delete a budget limit.
+ * Delete a budget limit.
+ */
+ async deleteBudgetLimit(requestParameters: DeleteBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.deleteBudgetLimitRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * Get a single budget. If the start date and end date are submitted as well, the \"spent\" array will be updated accordingly.
+ * Get a single budget.
+ */
+ async getBudgetRaw(requestParameters: GetBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getBudget.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BudgetSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Get a single budget. If the start date and end date are submitted as well, the \"spent\" array will be updated accordingly.
+ * Get a single budget.
+ */
+ async getBudget(requestParameters: GetBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get single budget limit.
+ */
+ async getBudgetLimitRaw(requestParameters: GetBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getBudgetLimit.');
+ }
+
+ if (requestParameters.limitId === null || requestParameters.limitId === undefined) {
+ throw new runtime.RequiredError('limitId','Required parameter requestParameters.limitId was null or undefined when calling getBudgetLimit.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}/limits/{limitId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"limitId"}}`, encodeURIComponent(String(requestParameters.limitId))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BudgetLimitSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Get single budget limit.
+ */
+ async getBudgetLimit(requestParameters: GetBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getBudgetLimitRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Lists all attachments.
+ * Lists all attachments of a budget.
+ */
+ async listAttachmentByBudgetRaw(requestParameters: ListAttachmentByBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listAttachmentByBudget.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}/attachments`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * Lists all attachments.
+ * Lists all attachments of a budget.
+ */
+ async listAttachmentByBudget(requestParameters: ListAttachmentByBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listAttachmentByBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all the budgets the user has made. If the start date and end date are submitted as well, the \"spent\" array will be updated accordingly.
+ * List all budgets.
+ */
+ async listBudgetRaw(requestParameters: ListBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BudgetArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all the budgets the user has made. If the start date and end date are submitted as well, the \"spent\" array will be updated accordingly.
+ * List all budgets.
+ */
+ async listBudget(requestParameters: ListBudgetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get all budget limits for for this date range.
+ * Get list of budget limits by date
+ */
+ async listBudgetLimitRaw(requestParameters: ListBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling listBudgetLimit.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling listBudgetLimit.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budget-limits`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BudgetLimitArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * Get all budget limits for for this date range.
+ * Get list of budget limits by date
+ */
+ async listBudgetLimit(requestParameters: ListBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listBudgetLimitRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get all budget limits for this budget and the money spent, and money left. You can limit the list by submitting a date range as well. The \"spent\" array for each budget limit is NOT influenced by the start and end date of your query, but by the start and end date of the budget limit itself.
+ * Get all limits for a budget.
+ */
+ async listBudgetLimitByBudgetRaw(requestParameters: ListBudgetLimitByBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listBudgetLimitByBudget.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}/limits`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BudgetLimitArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * Get all budget limits for this budget and the money spent, and money left. You can limit the list by submitting a date range as well. The \"spent\" array for each budget limit is NOT influenced by the start and end date of your query, but by the start and end date of the budget limit itself.
+ * Get all limits for a budget.
+ */
+ async listBudgetLimitByBudget(requestParameters: ListBudgetLimitByBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listBudgetLimitByBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get all transactions linked to a budget, possibly limited by start and end
+ * All transactions to a budget.
+ */
+ async listTransactionByBudgetRaw(requestParameters: ListTransactionByBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listTransactionByBudget.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}/transactions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => TransactionArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * Get all transactions linked to a budget, possibly limited by start and end
+ * All transactions to a budget.
+ */
+ async listTransactionByBudget(requestParameters: ListTransactionByBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTransactionByBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all the transactions within one budget limit. The start and end date are dictated by the budget limit.
+ * List all transactions by a budget limit ID.
+ */
+ async listTransactionByBudgetLimitRaw(requestParameters: ListTransactionByBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listTransactionByBudgetLimit.');
+ }
+
+ if (requestParameters.limitId === null || requestParameters.limitId === undefined) {
+ throw new runtime.RequiredError('limitId','Required parameter requestParameters.limitId was null or undefined when calling listTransactionByBudgetLimit.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}/limits/{limitId}/transactions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"limitId"}}`, encodeURIComponent(String(requestParameters.limitId))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => TransactionArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all the transactions within one budget limit. The start and end date are dictated by the budget limit.
+ * List all transactions by a budget limit ID.
+ */
+ async listTransactionByBudgetLimit(requestParameters: ListTransactionByBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTransactionByBudgetLimitRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Creates a new budget. The data required can be submitted as a JSON body or as a list of parameters.
+ * Store a new budget
+ */
+ async storeBudgetRaw(requestParameters: StoreBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.budgetStore === null || requestParameters.budgetStore === undefined) {
+ throw new runtime.RequiredError('budgetStore','Required parameter requestParameters.budgetStore was null or undefined when calling storeBudget.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets`,
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: BudgetStoreToJSON(requestParameters.budgetStore),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BudgetSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Creates a new budget. The data required can be submitted as a JSON body or as a list of parameters.
+ * Store a new budget
+ */
+ async storeBudget(requestParameters: StoreBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.storeBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Store a new budget limit under this budget.
+ * Store new budget limit.
+ */
+ async storeBudgetLimitRaw(requestParameters: StoreBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling storeBudgetLimit.');
+ }
+
+ if (requestParameters.budgetLimitStore === null || requestParameters.budgetLimitStore === undefined) {
+ throw new runtime.RequiredError('budgetLimitStore','Required parameter requestParameters.budgetLimitStore was null or undefined when calling storeBudgetLimit.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}/limits`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: BudgetLimitStoreToJSON(requestParameters.budgetLimitStore),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BudgetLimitSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Store a new budget limit under this budget.
+ * Store new budget limit.
+ */
+ async storeBudgetLimit(requestParameters: StoreBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.storeBudgetLimitRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Update existing budget. This endpoint cannot be used to set budget amount limits.
+ * Update existing budget.
+ */
+ async updateBudgetRaw(requestParameters: UpdateBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateBudget.');
+ }
+
+ if (requestParameters.budgetUpdate === null || requestParameters.budgetUpdate === undefined) {
+ throw new runtime.RequiredError('budgetUpdate','Required parameter requestParameters.budgetUpdate was null or undefined when calling updateBudget.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'PUT',
+ headers: headerParameters,
+ query: queryParameters,
+ body: BudgetUpdateToJSON(requestParameters.budgetUpdate),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BudgetSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Update existing budget. This endpoint cannot be used to set budget amount limits.
+ * Update existing budget.
+ */
+ async updateBudget(requestParameters: UpdateBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Update existing budget limit.
+ * Update existing budget limit.
+ */
+ async updateBudgetLimitRaw(requestParameters: UpdateBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateBudgetLimit.');
+ }
+
+ if (requestParameters.limitId === null || requestParameters.limitId === undefined) {
+ throw new runtime.RequiredError('limitId','Required parameter requestParameters.limitId was null or undefined when calling updateBudgetLimit.');
+ }
+
+ if (requestParameters.budgetLimit === null || requestParameters.budgetLimit === undefined) {
+ throw new runtime.RequiredError('budgetLimit','Required parameter requestParameters.budgetLimit was null or undefined when calling updateBudgetLimit.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/budgets/{id}/limits/{limitId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"limitId"}}`, encodeURIComponent(String(requestParameters.limitId))),
+ method: 'PUT',
+ headers: headerParameters,
+ query: queryParameters,
+ body: BudgetLimitToJSON(requestParameters.budgetLimit),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BudgetLimitSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Update existing budget limit.
+ * Update existing budget limit.
+ */
+ async updateBudgetLimit(requestParameters: UpdateBudgetLimitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateBudgetLimitRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/src/lib/api/apis/CategoriesApi.ts b/src/lib/api/apis/CategoriesApi.ts
new file mode 100644
index 0000000..676a5e4
--- /dev/null
+++ b/src/lib/api/apis/CategoriesApi.ts
@@ -0,0 +1,501 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AttachmentArray,
+ BadRequest,
+ Category,
+ CategoryArray,
+ CategorySingle,
+ CategoryUpdate,
+ InternalException,
+ NotFound,
+ TransactionArray,
+ TransactionTypeFilter,
+ Unauthenticated,
+ ValidationError,
+} from '../models/index';
+import {
+ AttachmentArrayFromJSON,
+ AttachmentArrayToJSON,
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ CategoryFromJSON,
+ CategoryToJSON,
+ CategoryArrayFromJSON,
+ CategoryArrayToJSON,
+ CategorySingleFromJSON,
+ CategorySingleToJSON,
+ CategoryUpdateFromJSON,
+ CategoryUpdateToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ TransactionArrayFromJSON,
+ TransactionArrayToJSON,
+ TransactionTypeFilterFromJSON,
+ TransactionTypeFilterToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+ ValidationErrorFromJSON,
+ ValidationErrorToJSON,
+} from '../models/index';
+
+export interface DeleteCategoryRequest {
+ id: string;
+ xTraceId?: string;
+}
+
+export interface GetCategoryRequest {
+ id: string;
+ xTraceId?: string;
+ start?: Date;
+ end?: Date;
+}
+
+export interface ListAttachmentByCategoryRequest {
+ id: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListCategoryRequest {
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListTransactionByCategoryRequest {
+ id: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ start?: Date;
+ end?: Date;
+ type?: TransactionTypeFilter;
+}
+
+export interface StoreCategoryRequest {
+ category: Category;
+ xTraceId?: string;
+}
+
+export interface UpdateCategoryRequest {
+ id: string;
+ categoryUpdate: CategoryUpdate;
+ xTraceId?: string;
+}
+
+/**
+ *
+ */
+export class CategoriesApi extends runtime.BaseAPI {
+
+ /**
+ * Delete a category. Transactions will not be removed.
+ * Delete a category.
+ */
+ async deleteCategoryRaw(requestParameters: DeleteCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteCategory.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/categories/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'DELETE',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Delete a category. Transactions will not be removed.
+ * Delete a category.
+ */
+ async deleteCategory(requestParameters: DeleteCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.deleteCategoryRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * Get a single category.
+ * Get a single category.
+ */
+ async getCategoryRaw(requestParameters: GetCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getCategory.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/categories/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CategorySingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Get a single category.
+ * Get a single category.
+ */
+ async getCategory(requestParameters: GetCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getCategoryRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Lists all attachments.
+ * Lists all attachments.
+ */
+ async listAttachmentByCategoryRaw(requestParameters: ListAttachmentByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listAttachmentByCategory.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/categories/{id}/attachments`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AttachmentArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * Lists all attachments.
+ * Lists all attachments.
+ */
+ async listAttachmentByCategory(requestParameters: ListAttachmentByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listAttachmentByCategoryRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all categories.
+ * List all categories.
+ */
+ async listCategoryRaw(requestParameters: ListCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/categories`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CategoryArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all categories.
+ * List all categories.
+ */
+ async listCategory(requestParameters: ListCategoryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listCategoryRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all transactions in a category, optionally limited to the date ranges specified.
+ * List all transactions in a category.
+ */
+ async listTransactionByCategoryRaw(requestParameters: ListTransactionByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listTransactionByCategory.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/categories/{id}/transactions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => TransactionArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all transactions in a category, optionally limited to the date ranges specified.
+ * List all transactions in a category.
+ */
+ async listTransactionByCategory(requestParameters: ListTransactionByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTransactionByCategoryRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Creates a new category. The data required can be submitted as a JSON body or as a list of parameters.
+ * Store a new category
+ */
+ async storeCategoryRaw(requestParameters: StoreCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.category === null || requestParameters.category === undefined) {
+ throw new runtime.RequiredError('category','Required parameter requestParameters.category was null or undefined when calling storeCategory.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/categories`,
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CategoryToJSON(requestParameters.category),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CategorySingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Creates a new category. The data required can be submitted as a JSON body or as a list of parameters.
+ * Store a new category
+ */
+ async storeCategory(requestParameters: StoreCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.storeCategoryRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Update existing category.
+ * Update existing category.
+ */
+ async updateCategoryRaw(requestParameters: UpdateCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.id === null || requestParameters.id === undefined) {
+ throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling updateCategory.');
+ }
+
+ if (requestParameters.categoryUpdate === null || requestParameters.categoryUpdate === undefined) {
+ throw new runtime.RequiredError('categoryUpdate','Required parameter requestParameters.categoryUpdate was null or undefined when calling updateCategory.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/categories/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
+ method: 'PUT',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CategoryUpdateToJSON(requestParameters.categoryUpdate),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CategorySingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Update existing category.
+ * Update existing category.
+ */
+ async updateCategory(requestParameters: UpdateCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateCategoryRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/src/lib/api/apis/ChartsApi.ts b/src/lib/api/apis/ChartsApi.ts
new file mode 100644
index 0000000..f31964c
--- /dev/null
+++ b/src/lib/api/apis/ChartsApi.ts
@@ -0,0 +1,109 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ BadRequest,
+ ChartDataSet,
+ InternalException,
+ NotFound,
+ Unauthenticated,
+} from '../models/index';
+import {
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ ChartDataSetFromJSON,
+ ChartDataSetToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+} from '../models/index';
+
+export interface GetChartAccountOverviewRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+}
+
+/**
+ *
+ */
+export class ChartsApi extends runtime.BaseAPI {
+
+ /**
+ * This endpoint returns the data required to generate a chart with basic asset account balance information.
+ * Dashboard chart with asset account balance information.
+ */
+ async getChartAccountOverviewRaw(requestParameters: GetChartAccountOverviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling getChartAccountOverview.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling getChartAccountOverview.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/chart/account/overview`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ChartDataSetFromJSON));
+ }
+
+ /**
+ * This endpoint returns the data required to generate a chart with basic asset account balance information.
+ * Dashboard chart with asset account balance information.
+ */
+ async getChartAccountOverview(requestParameters: GetChartAccountOverviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getChartAccountOverviewRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/src/lib/api/apis/ConfigurationApi.ts b/src/lib/api/apis/ConfigurationApi.ts
new file mode 100644
index 0000000..4438523
--- /dev/null
+++ b/src/lib/api/apis/ConfigurationApi.ts
@@ -0,0 +1,239 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ BadRequest,
+ ConfigValueFilter,
+ ConfigValueUpdateFilter,
+ ConfigurationSingle,
+ InternalException,
+ ModelConfiguration,
+ NotFound,
+ PolymorphicProperty,
+ Unauthenticated,
+ ValidationError,
+} from '../models/index';
+import {
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ ConfigValueFilterFromJSON,
+ ConfigValueFilterToJSON,
+ ConfigValueUpdateFilterFromJSON,
+ ConfigValueUpdateFilterToJSON,
+ ConfigurationSingleFromJSON,
+ ConfigurationSingleToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ ModelConfigurationFromJSON,
+ ModelConfigurationToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ PolymorphicPropertyFromJSON,
+ PolymorphicPropertyToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+ ValidationErrorFromJSON,
+ ValidationErrorToJSON,
+} from '../models/index';
+
+export interface GetConfigurationRequest {
+ xTraceId?: string;
+}
+
+export interface GetSingleConfigurationRequest {
+ name: ConfigValueFilter;
+ xTraceId?: string;
+}
+
+export interface SetConfigurationRequest {
+ name: ConfigValueUpdateFilter;
+ value: PolymorphicProperty;
+ xTraceId?: string;
+}
+
+/**
+ *
+ */
+export class ConfigurationApi extends runtime.BaseAPI {
+
+ /**
+ * Returns all editable and not-editable configuration values for this Firefly III installation
+ * Get Firefly III system configuration values.
+ */
+ async getConfigurationRaw(requestParameters: GetConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/configuration`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ModelConfigurationFromJSON));
+ }
+
+ /**
+ * Returns all editable and not-editable configuration values for this Firefly III installation
+ * Get Firefly III system configuration values.
+ */
+ async getConfiguration(requestParameters: GetConfigurationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.getConfigurationRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Returns one configuration variable for this Firefly III installation
+ * Get a single Firefly III system configuration value
+ */
+ async getSingleConfigurationRaw(requestParameters: GetSingleConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.name === null || requestParameters.name === undefined) {
+ throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling getSingleConfiguration.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/configuration/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConfigurationSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Returns one configuration variable for this Firefly III installation
+ * Get a single Firefly III system configuration value
+ */
+ async getSingleConfiguration(requestParameters: GetSingleConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getSingleConfigurationRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Set a single configuration value. Not all configuration values can be updated so the list of accepted configuration variables is small.
+ * Update configuration value
+ */
+ async setConfigurationRaw(requestParameters: SetConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.name === null || requestParameters.name === undefined) {
+ throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling setConfiguration.');
+ }
+
+ if (requestParameters.value === null || requestParameters.value === undefined) {
+ throw new runtime.RequiredError('value','Required parameter requestParameters.value was null or undefined when calling setConfiguration.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const consumes: runtime.Consume[] = [
+ { contentType: 'application/x-www-form-urlencoded' },
+ { contentType: 'application/json' },
+ ];
+ // @ts-ignore: canConsumeForm may be unused
+ const canConsumeForm = runtime.canConsumeForm(consumes);
+
+ let formParams: { append(param: string, value: any): any };
+ let useForm = false;
+ if (useForm) {
+ formParams = new FormData();
+ } else {
+ formParams = new URLSearchParams();
+ }
+
+ if (requestParameters.value !== undefined) {
+ formParams.append('value', new Blob([JSON.stringify(PolymorphicPropertyToJSON(requestParameters.value))], { type: "application/json", }));
+ }
+
+ const response = await this.request({
+ path: `/v1/configuration/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
+ method: 'PUT',
+ headers: headerParameters,
+ query: queryParameters,
+ body: formParams,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConfigurationSingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Set a single configuration value. Not all configuration values can be updated so the list of accepted configuration variables is small.
+ * Update configuration value
+ */
+ async setConfiguration(requestParameters: SetConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.setConfigurationRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/src/lib/api/apis/CurrenciesApi.ts b/src/lib/api/apis/CurrenciesApi.ts
new file mode 100644
index 0000000..9223e4e
--- /dev/null
+++ b/src/lib/api/apis/CurrenciesApi.ts
@@ -0,0 +1,1060 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ AccountArray,
+ AccountTypeFilter,
+ AvailableBudgetArray,
+ BadRequest,
+ BillArray,
+ BudgetLimitArray,
+ CurrencyArray,
+ CurrencySingle,
+ CurrencyStore,
+ CurrencyUpdate,
+ InternalException,
+ NotFound,
+ RecurrenceArray,
+ RuleArray,
+ TransactionArray,
+ TransactionTypeFilter,
+ Unauthenticated,
+ ValidationError,
+} from '../models/index';
+import {
+ AccountArrayFromJSON,
+ AccountArrayToJSON,
+ AccountTypeFilterFromJSON,
+ AccountTypeFilterToJSON,
+ AvailableBudgetArrayFromJSON,
+ AvailableBudgetArrayToJSON,
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ BillArrayFromJSON,
+ BillArrayToJSON,
+ BudgetLimitArrayFromJSON,
+ BudgetLimitArrayToJSON,
+ CurrencyArrayFromJSON,
+ CurrencyArrayToJSON,
+ CurrencySingleFromJSON,
+ CurrencySingleToJSON,
+ CurrencyStoreFromJSON,
+ CurrencyStoreToJSON,
+ CurrencyUpdateFromJSON,
+ CurrencyUpdateToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ RecurrenceArrayFromJSON,
+ RecurrenceArrayToJSON,
+ RuleArrayFromJSON,
+ RuleArrayToJSON,
+ TransactionArrayFromJSON,
+ TransactionArrayToJSON,
+ TransactionTypeFilterFromJSON,
+ TransactionTypeFilterToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+ ValidationErrorFromJSON,
+ ValidationErrorToJSON,
+} from '../models/index';
+
+export interface DefaultCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+}
+
+export interface DeleteCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+}
+
+export interface DisableCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+}
+
+export interface EnableCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+}
+
+export interface GetCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+}
+
+export interface GetDefaultCurrencyRequest {
+ xTraceId?: string;
+}
+
+export interface ListAccountByCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ date?: Date;
+ type?: AccountTypeFilter;
+}
+
+export interface ListAvailableBudgetByCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListBillByCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListBudgetLimitByCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ start?: Date;
+ end?: Date;
+}
+
+export interface ListCurrencyRequest {
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListRecurrenceByCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListRuleByCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+}
+
+export interface ListTransactionByCurrencyRequest {
+ code: string;
+ xTraceId?: string;
+ limit?: number;
+ page?: number;
+ start?: Date;
+ end?: Date;
+ type?: TransactionTypeFilter;
+}
+
+export interface StoreCurrencyRequest {
+ currencyStore: CurrencyStore;
+ xTraceId?: string;
+}
+
+export interface UpdateCurrencyRequest {
+ code: string;
+ currencyUpdate: CurrencyUpdate;
+ xTraceId?: string;
+}
+
+/**
+ *
+ */
+export class CurrenciesApi extends runtime.BaseAPI {
+
+ /**
+ * Make this currency the default currency for the user. If the currency is not enabled, it will be enabled as well.
+ * Make currency default currency.
+ */
+ async defaultCurrencyRaw(requestParameters: DefaultCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling defaultCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}/default`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CurrencySingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Make this currency the default currency for the user. If the currency is not enabled, it will be enabled as well.
+ * Make currency default currency.
+ */
+ async defaultCurrency(requestParameters: DefaultCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.defaultCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Delete a currency.
+ * Delete a currency.
+ */
+ async deleteCurrencyRaw(requestParameters: DeleteCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling deleteCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'DELETE',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Delete a currency.
+ * Delete a currency.
+ */
+ async deleteCurrency(requestParameters: DeleteCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.deleteCurrencyRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * Disable a currency.
+ * Disable a currency.
+ */
+ async disableCurrencyRaw(requestParameters: DisableCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling disableCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}/disable`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CurrencySingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Disable a currency.
+ * Disable a currency.
+ */
+ async disableCurrency(requestParameters: DisableCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.disableCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Enable a single currency.
+ * Enable a single currency.
+ */
+ async enableCurrencyRaw(requestParameters: EnableCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling enableCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}/enable`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CurrencySingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Enable a single currency.
+ * Enable a single currency.
+ */
+ async enableCurrency(requestParameters: EnableCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.enableCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get a single currency.
+ * Get a single currency.
+ */
+ async getCurrencyRaw(requestParameters: GetCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling getCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CurrencySingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Get a single currency.
+ * Get a single currency.
+ */
+ async getCurrency(requestParameters: GetCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Get the user\'s default currency.
+ * Get the user\'s default currency.
+ */
+ async getDefaultCurrencyRaw(requestParameters: GetDefaultCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/default`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CurrencySingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Get the user\'s default currency.
+ * Get the user\'s default currency.
+ */
+ async getDefaultCurrency(requestParameters: GetDefaultCurrencyRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.getDefaultCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all accounts with this currency.
+ * List all accounts with this currency.
+ */
+ async listAccountByCurrencyRaw(requestParameters: ListAccountByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling listAccountByCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.date !== undefined) {
+ queryParameters['date'] = (requestParameters.date as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}/accounts`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all accounts with this currency.
+ * List all accounts with this currency.
+ */
+ async listAccountByCurrency(requestParameters: ListAccountByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listAccountByCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all available budgets with this currency.
+ * List all available budgets with this currency.
+ */
+ async listAvailableBudgetByCurrencyRaw(requestParameters: ListAvailableBudgetByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling listAvailableBudgetByCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}/available-budgets`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => AvailableBudgetArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all available budgets with this currency.
+ * List all available budgets with this currency.
+ */
+ async listAvailableBudgetByCurrency(requestParameters: ListAvailableBudgetByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listAvailableBudgetByCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all bills with this currency.
+ * List all bills with this currency.
+ */
+ async listBillByCurrencyRaw(requestParameters: ListBillByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling listBillByCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}/bills`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BillArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all bills with this currency.
+ * List all bills with this currency.
+ */
+ async listBillByCurrency(requestParameters: ListBillByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listBillByCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all budget limits with this currency
+ * List all budget limits with this currency
+ */
+ async listBudgetLimitByCurrencyRaw(requestParameters: ListBudgetLimitByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling listBudgetLimitByCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}/budget_limits`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => BudgetLimitArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all budget limits with this currency
+ * List all budget limits with this currency
+ */
+ async listBudgetLimitByCurrency(requestParameters: ListBudgetLimitByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listBudgetLimitByCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all currencies.
+ * List all currencies.
+ */
+ async listCurrencyRaw(requestParameters: ListCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CurrencyArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all currencies.
+ * List all currencies.
+ */
+ async listCurrency(requestParameters: ListCurrencyRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all recurring transactions with this currency.
+ * List all recurring transactions with this currency.
+ */
+ async listRecurrenceByCurrencyRaw(requestParameters: ListRecurrenceByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling listRecurrenceByCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}/recurrences`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RecurrenceArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all recurring transactions with this currency.
+ * List all recurring transactions with this currency.
+ */
+ async listRecurrenceByCurrency(requestParameters: ListRecurrenceByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listRecurrenceByCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all rules with this currency.
+ * List all rules with this currency.
+ */
+ async listRuleByCurrencyRaw(requestParameters: ListRuleByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling listRuleByCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}/rules`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => RuleArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all rules with this currency.
+ * List all rules with this currency.
+ */
+ async listRuleByCurrency(requestParameters: ListRuleByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listRuleByCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * List all transactions with this currency.
+ * List all transactions with this currency.
+ */
+ async listTransactionByCurrencyRaw(requestParameters: ListTransactionByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling listTransactionByCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.limit !== undefined) {
+ queryParameters['limit'] = requestParameters.limit;
+ }
+
+ if (requestParameters.page !== undefined) {
+ queryParameters['page'] = requestParameters.page;
+ }
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}/transactions`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => TransactionArrayFromJSON(jsonValue));
+ }
+
+ /**
+ * List all transactions with this currency.
+ * List all transactions with this currency.
+ */
+ async listTransactionByCurrency(requestParameters: ListTransactionByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.listTransactionByCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Creates a new currency. The data required can be submitted as a JSON body or as a list of parameters.
+ * Store a new currency
+ */
+ async storeCurrencyRaw(requestParameters: StoreCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.currencyStore === null || requestParameters.currencyStore === undefined) {
+ throw new runtime.RequiredError('currencyStore','Required parameter requestParameters.currencyStore was null or undefined when calling storeCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies`,
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CurrencyStoreToJSON(requestParameters.currencyStore),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CurrencySingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Creates a new currency. The data required can be submitted as a JSON body or as a list of parameters.
+ * Store a new currency
+ */
+ async storeCurrency(requestParameters: StoreCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.storeCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * Update existing currency.
+ * Update existing currency.
+ */
+ async updateCurrencyRaw(requestParameters: UpdateCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.code === null || requestParameters.code === undefined) {
+ throw new runtime.RequiredError('code','Required parameter requestParameters.code was null or undefined when calling updateCurrency.');
+ }
+
+ if (requestParameters.currencyUpdate === null || requestParameters.currencyUpdate === undefined) {
+ throw new runtime.RequiredError('currencyUpdate','Required parameter requestParameters.currencyUpdate was null or undefined when calling updateCurrency.');
+ }
+
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ headerParameters['Content-Type'] = 'application/vnd.api+json';
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/currencies/{code}`.replace(`{${"code"}}`, encodeURIComponent(String(requestParameters.code))),
+ method: 'PUT',
+ headers: headerParameters,
+ query: queryParameters,
+ body: CurrencyUpdateToJSON(requestParameters.currencyUpdate),
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => CurrencySingleFromJSON(jsonValue));
+ }
+
+ /**
+ * Update existing currency.
+ * Update existing currency.
+ */
+ async updateCurrency(requestParameters: UpdateCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.updateCurrencyRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+}
diff --git a/src/lib/api/apis/DataApi.ts b/src/lib/api/apis/DataApi.ts
new file mode 100644
index 0000000..c76ae91
--- /dev/null
+++ b/src/lib/api/apis/DataApi.ts
@@ -0,0 +1,711 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ BadRequest,
+ DataDestroyObject,
+ ExportFileFilter,
+ InternalException,
+ NotFound,
+ Unauthenticated,
+} from '../models/index';
+import {
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ DataDestroyObjectFromJSON,
+ DataDestroyObjectToJSON,
+ ExportFileFilterFromJSON,
+ ExportFileFilterToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+} from '../models/index';
+
+export interface BulkUpdateTransactionsRequest {
+ query: string;
+}
+
+export interface DestroyDataRequest {
+ objects: DataDestroyObject;
+ xTraceId?: string;
+}
+
+export interface ExportAccountsRequest {
+ xTraceId?: string;
+ type?: ExportFileFilter;
+}
+
+export interface ExportBillsRequest {
+ xTraceId?: string;
+ type?: ExportFileFilter;
+}
+
+export interface ExportBudgetsRequest {
+ xTraceId?: string;
+ type?: ExportFileFilter;
+}
+
+export interface ExportCategoriesRequest {
+ xTraceId?: string;
+ type?: ExportFileFilter;
+}
+
+export interface ExportPiggiesRequest {
+ xTraceId?: string;
+ type?: ExportFileFilter;
+}
+
+export interface ExportRecurringRequest {
+ xTraceId?: string;
+ type?: ExportFileFilter;
+}
+
+export interface ExportRulesRequest {
+ xTraceId?: string;
+ type?: ExportFileFilter;
+}
+
+export interface ExportTagsRequest {
+ xTraceId?: string;
+ type?: ExportFileFilter;
+}
+
+export interface ExportTransactionsRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: string;
+ type?: ExportFileFilter;
+}
+
+export interface PurgeDataRequest {
+ xTraceId?: string;
+}
+
+/**
+ *
+ */
+export class DataApi extends runtime.BaseAPI {
+
+ /**
+ * Allows you to update transactions in bulk.
+ * Bulk update transaction properties. For more information, see https://docs.firefly-iii.org/firefly-iii/api/specials
+ */
+ async bulkUpdateTransactionsRaw(requestParameters: BulkUpdateTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.query === null || requestParameters.query === undefined) {
+ throw new runtime.RequiredError('query','Required parameter requestParameters.query was null or undefined when calling bulkUpdateTransactions.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.query !== undefined) {
+ queryParameters['query'] = requestParameters.query;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/bulk/transactions`,
+ method: 'POST',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * Allows you to update transactions in bulk.
+ * Bulk update transaction properties. For more information, see https://docs.firefly-iii.org/firefly-iii/api/specials
+ */
+ async bulkUpdateTransactions(requestParameters: BulkUpdateTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.bulkUpdateTransactionsRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * A call to this endpoint deletes the requested data type. Use it with care and always with user permission. The demo user is incapable of using this endpoint.
+ * Endpoint to destroy user data
+ */
+ async destroyDataRaw(requestParameters: DestroyDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.objects === null || requestParameters.objects === undefined) {
+ throw new runtime.RequiredError('objects','Required parameter requestParameters.objects was null or undefined when calling destroyData.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.objects !== undefined) {
+ queryParameters['objects'] = requestParameters.objects;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/destroy`,
+ method: 'DELETE',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * A call to this endpoint deletes the requested data type. Use it with care and always with user permission. The demo user is incapable of using this endpoint.
+ * Endpoint to destroy user data
+ */
+ async destroyData(requestParameters: DestroyDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.destroyDataRaw(requestParameters, initOverrides);
+ }
+
+ /**
+ * This endpoint allows you to export your accounts from Firefly III into a file. Currently supports CSV exports only.
+ * Export account data from Firefly III
+ */
+ async exportAccountsRaw(requestParameters: ExportAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/export/accounts`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * This endpoint allows you to export your accounts from Firefly III into a file. Currently supports CSV exports only.
+ * Export account data from Firefly III
+ */
+ async exportAccounts(requestParameters: ExportAccountsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.exportAccountsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint allows you to export your bills from Firefly III into a file. Currently supports CSV exports only.
+ * Export bills from Firefly III
+ */
+ async exportBillsRaw(requestParameters: ExportBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/export/bills`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * This endpoint allows you to export your bills from Firefly III into a file. Currently supports CSV exports only.
+ * Export bills from Firefly III
+ */
+ async exportBills(requestParameters: ExportBillsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.exportBillsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint allows you to export your budgets and associated budget data from Firefly III into a file. Currently supports CSV exports only.
+ * Export budgets and budget amount data from Firefly III
+ */
+ async exportBudgetsRaw(requestParameters: ExportBudgetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/export/budgets`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * This endpoint allows you to export your budgets and associated budget data from Firefly III into a file. Currently supports CSV exports only.
+ * Export budgets and budget amount data from Firefly III
+ */
+ async exportBudgets(requestParameters: ExportBudgetsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.exportBudgetsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint allows you to export your categories from Firefly III into a file. Currently supports CSV exports only.
+ * Export category data from Firefly III
+ */
+ async exportCategoriesRaw(requestParameters: ExportCategoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/export/categories`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * This endpoint allows you to export your categories from Firefly III into a file. Currently supports CSV exports only.
+ * Export category data from Firefly III
+ */
+ async exportCategories(requestParameters: ExportCategoriesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.exportCategoriesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint allows you to export your piggy banks from Firefly III into a file. Currently supports CSV exports only.
+ * Export piggy banks from Firefly III
+ */
+ async exportPiggiesRaw(requestParameters: ExportPiggiesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/export/piggy-banks`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * This endpoint allows you to export your piggy banks from Firefly III into a file. Currently supports CSV exports only.
+ * Export piggy banks from Firefly III
+ */
+ async exportPiggies(requestParameters: ExportPiggiesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.exportPiggiesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint allows you to export your recurring transactions from Firefly III into a file. Currently supports CSV exports only.
+ * Export recurring transaction data from Firefly III
+ */
+ async exportRecurringRaw(requestParameters: ExportRecurringRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/export/recurring`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * This endpoint allows you to export your recurring transactions from Firefly III into a file. Currently supports CSV exports only.
+ * Export recurring transaction data from Firefly III
+ */
+ async exportRecurring(requestParameters: ExportRecurringRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.exportRecurringRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint allows you to export your rules and rule groups from Firefly III into a file. Currently supports CSV exports only.
+ * Export rule groups and rule data from Firefly III
+ */
+ async exportRulesRaw(requestParameters: ExportRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/export/rules`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * This endpoint allows you to export your rules and rule groups from Firefly III into a file. Currently supports CSV exports only.
+ * Export rule groups and rule data from Firefly III
+ */
+ async exportRules(requestParameters: ExportRulesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.exportRulesRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint allows you to export your tags from Firefly III into a file. Currently supports CSV exports only.
+ * Export tag data from Firefly III
+ */
+ async exportTagsRaw(requestParameters: ExportTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/export/tags`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * This endpoint allows you to export your tags from Firefly III into a file. Currently supports CSV exports only.
+ * Export tag data from Firefly III
+ */
+ async exportTags(requestParameters: ExportTagsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.exportTagsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint allows you to export transactions from Firefly III into a file. Currently supports CSV exports only.
+ * Export transaction data from Firefly III
+ */
+ async exportTransactionsRaw(requestParameters: ExportTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling exportTransactions.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling exportTransactions.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.accounts !== undefined) {
+ queryParameters['accounts'] = requestParameters.accounts;
+ }
+
+ if (requestParameters.type !== undefined) {
+ queryParameters['type'] = requestParameters.type;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/export/transactions`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.BlobApiResponse(response);
+ }
+
+ /**
+ * This endpoint allows you to export transactions from Firefly III into a file. Currently supports CSV exports only.
+ * Export transaction data from Firefly III
+ */
+ async exportTransactions(requestParameters: ExportTransactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ const response = await this.exportTransactionsRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * A call to this endpoint purges all previously deleted data. Use it with care and always with user permission. The demo user is incapable of using this endpoint.
+ * Endpoint to purge user data
+ */
+ async purgeDataRaw(requestParameters: PurgeDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const queryParameters: any = {};
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/data/purge`,
+ method: 'DELETE',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.VoidApiResponse(response);
+ }
+
+ /**
+ * A call to this endpoint purges all previously deleted data. Use it with care and always with user permission. The demo user is incapable of using this endpoint.
+ * Endpoint to purge user data
+ */
+ async purgeData(requestParameters: PurgeDataRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
+ await this.purgeDataRaw(requestParameters, initOverrides);
+ }
+
+}
diff --git a/src/lib/api/apis/InsightApi.ts b/src/lib/api/apis/InsightApi.ts
new file mode 100644
index 0000000..ffcdf3c
--- /dev/null
+++ b/src/lib/api/apis/InsightApi.ts
@@ -0,0 +1,1816 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Firefly III API v2.0.10
+ * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2023-10-15T12:13:25+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
+ *
+ * The version of the OpenAPI document: 2.0.10
+ * Contact: james@firefly-iii.org
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+import * as runtime from '../runtime';
+import type {
+ BadRequest,
+ InsightGroupEntry,
+ InsightTotalEntry,
+ InsightTransferEntry,
+ InternalException,
+ NotFound,
+ Unauthenticated,
+} from '../models/index';
+import {
+ BadRequestFromJSON,
+ BadRequestToJSON,
+ InsightGroupEntryFromJSON,
+ InsightGroupEntryToJSON,
+ InsightTotalEntryFromJSON,
+ InsightTotalEntryToJSON,
+ InsightTransferEntryFromJSON,
+ InsightTransferEntryToJSON,
+ InternalExceptionFromJSON,
+ InternalExceptionToJSON,
+ NotFoundFromJSON,
+ NotFoundToJSON,
+ UnauthenticatedFromJSON,
+ UnauthenticatedToJSON,
+} from '../models/index';
+
+export interface InsightExpenseAssetRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightExpenseBillRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ bills?: Array;
+ accounts?: Array;
+}
+
+export interface InsightExpenseBudgetRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ budgets?: Array;
+ accounts?: Array;
+}
+
+export interface InsightExpenseCategoryRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ categories?: Array;
+ accounts?: Array;
+}
+
+export interface InsightExpenseExpenseRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightExpenseNoBillRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightExpenseNoBudgetRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightExpenseNoCategoryRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightExpenseNoTagRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightExpenseTagRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ tags?: Array;
+ accounts?: Array;
+}
+
+export interface InsightExpenseTotalRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightIncomeAssetRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightIncomeCategoryRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ categories?: Array;
+ accounts?: Array;
+}
+
+export interface InsightIncomeNoCategoryRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightIncomeNoTagRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightIncomeRevenueRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightIncomeTagRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ tags?: Array;
+ accounts?: Array;
+}
+
+export interface InsightIncomeTotalRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightTransferCategoryRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ categories?: Array;
+ accounts?: Array;
+}
+
+export interface InsightTransferNoCategoryRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightTransferNoTagRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightTransferTagRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ tags?: Array;
+ accounts?: Array;
+}
+
+export interface InsightTransferTotalRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+export interface InsightTransfersRequest {
+ start: Date;
+ end: Date;
+ xTraceId?: string;
+ accounts?: Array;
+}
+
+/**
+ *
+ */
+export class InsightApi extends runtime.BaseAPI {
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by asset account.
+ * Insight into expenses, grouped by asset account.
+ */
+ async insightExpenseAssetRaw(requestParameters: InsightExpenseAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseAsset.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseAsset.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/asset`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightGroupEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by asset account.
+ * Insight into expenses, grouped by asset account.
+ */
+ async insightExpenseAsset(requestParameters: InsightExpenseAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseAssetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by (any) bill.
+ * Insight into expenses, grouped by bill.
+ */
+ async insightExpenseBillRaw(requestParameters: InsightExpenseBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseBill.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseBill.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.bills) {
+ queryParameters['bills[]'] = requestParameters.bills;
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/bill`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightGroupEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by (any) bill.
+ * Insight into expenses, grouped by bill.
+ */
+ async insightExpenseBill(requestParameters: InsightExpenseBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseBillRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by (any) budget.
+ * Insight into expenses, grouped by budget.
+ */
+ async insightExpenseBudgetRaw(requestParameters: InsightExpenseBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseBudget.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseBudget.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.budgets) {
+ queryParameters['budgets[]'] = requestParameters.budgets;
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/budget`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightGroupEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by (any) budget.
+ * Insight into expenses, grouped by budget.
+ */
+ async insightExpenseBudget(requestParameters: InsightExpenseBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by (any) category.
+ * Insight into expenses, grouped by category.
+ */
+ async insightExpenseCategoryRaw(requestParameters: InsightExpenseCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseCategory.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseCategory.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.categories) {
+ queryParameters['categories[]'] = requestParameters.categories;
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/category`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightGroupEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by (any) category.
+ * Insight into expenses, grouped by category.
+ */
+ async insightExpenseCategory(requestParameters: InsightExpenseCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseCategoryRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by expense account.
+ * Insight into expenses, grouped by expense account.
+ */
+ async insightExpenseExpenseRaw(requestParameters: InsightExpenseExpenseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseExpense.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseExpense.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/expense`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightGroupEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by expense account.
+ * Insight into expenses, grouped by expense account.
+ */
+ async insightExpenseExpense(requestParameters: InsightExpenseExpenseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseExpenseRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, including only expenses with no bill.
+ * Insight into expenses, without bill.
+ */
+ async insightExpenseNoBillRaw(requestParameters: InsightExpenseNoBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseNoBill.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseNoBill.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/no-bill`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightTotalEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, including only expenses with no bill.
+ * Insight into expenses, without bill.
+ */
+ async insightExpenseNoBill(requestParameters: InsightExpenseNoBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseNoBillRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, including only expenses with no budget.
+ * Insight into expenses, without budget.
+ */
+ async insightExpenseNoBudgetRaw(requestParameters: InsightExpenseNoBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseNoBudget.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseNoBudget.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/no-budget`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightTotalEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, including only expenses with no budget.
+ * Insight into expenses, without budget.
+ */
+ async insightExpenseNoBudget(requestParameters: InsightExpenseNoBudgetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseNoBudgetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, including only expenses with no category.
+ * Insight into expenses, without category.
+ */
+ async insightExpenseNoCategoryRaw(requestParameters: InsightExpenseNoCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseNoCategory.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseNoCategory.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/no-category`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightTotalEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, including only expenses with no category.
+ * Insight into expenses, without category.
+ */
+ async insightExpenseNoCategory(requestParameters: InsightExpenseNoCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseNoCategoryRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, including only expenses with no tag.
+ * Insight into expenses, without tag.
+ */
+ async insightExpenseNoTagRaw(requestParameters: InsightExpenseNoTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseNoTag.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseNoTag.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/no-tag`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightTotalEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, including only expenses with no tag.
+ * Insight into expenses, without tag.
+ */
+ async insightExpenseNoTag(requestParameters: InsightExpenseNoTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseNoTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by (any) tag.
+ * Insight into expenses, grouped by tag.
+ */
+ async insightExpenseTagRaw(requestParameters: InsightExpenseTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseTag.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseTag.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.tags) {
+ queryParameters['tags[]'] = requestParameters.tags;
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/tag`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightGroupEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the expenses made by the user, grouped by (any) tag.
+ * Insight into expenses, grouped by tag.
+ */
+ async insightExpenseTag(requestParameters: InsightExpenseTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseTagRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a sum of the total expenses made by the user.
+ * Insight into total expenses.
+ */
+ async insightExpenseTotalRaw(requestParameters: InsightExpenseTotalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightExpenseTotal.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightExpenseTotal.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/expense/total`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightTotalEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a sum of the total expenses made by the user.
+ * Insight into total expenses.
+ */
+ async insightExpenseTotal(requestParameters: InsightExpenseTotalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightExpenseTotalRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the income received by the user, grouped by asset account.
+ * Insight into income, grouped by asset account.
+ */
+ async insightIncomeAssetRaw(requestParameters: InsightIncomeAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightIncomeAsset.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightIncomeAsset.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/income/asset`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightGroupEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the income received by the user, grouped by asset account.
+ * Insight into income, grouped by asset account.
+ */
+ async insightIncomeAsset(requestParameters: InsightIncomeAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightIncomeAssetRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the income received by the user, grouped by (any) category.
+ * Insight into income, grouped by category.
+ */
+ async insightIncomeCategoryRaw(requestParameters: InsightIncomeCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightIncomeCategory.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightIncomeCategory.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.categories) {
+ queryParameters['categories[]'] = requestParameters.categories;
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/income/category`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightGroupEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the income received by the user, grouped by (any) category.
+ * Insight into income, grouped by category.
+ */
+ async insightIncomeCategory(requestParameters: InsightIncomeCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
+ const response = await this.insightIncomeCategoryRaw(requestParameters, initOverrides);
+ return await response.value();
+ }
+
+ /**
+ * This endpoint gives a summary of the income received by the user, including only income with no category.
+ * Insight into income, without category.
+ */
+ async insightIncomeNoCategoryRaw(requestParameters: InsightIncomeNoCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> {
+ if (requestParameters.start === null || requestParameters.start === undefined) {
+ throw new runtime.RequiredError('start','Required parameter requestParameters.start was null or undefined when calling insightIncomeNoCategory.');
+ }
+
+ if (requestParameters.end === null || requestParameters.end === undefined) {
+ throw new runtime.RequiredError('end','Required parameter requestParameters.end was null or undefined when calling insightIncomeNoCategory.');
+ }
+
+ const queryParameters: any = {};
+
+ if (requestParameters.start !== undefined) {
+ queryParameters['start'] = (requestParameters.start as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.end !== undefined) {
+ queryParameters['end'] = (requestParameters.end as any).toISOString().substring(0,10);
+ }
+
+ if (requestParameters.accounts) {
+ queryParameters['accounts[]'] = requestParameters.accounts;
+ }
+
+ const headerParameters: runtime.HTTPHeaders = {};
+
+ if (requestParameters.xTraceId !== undefined && requestParameters.xTraceId !== null) {
+ headerParameters['X-Trace-Id'] = String(requestParameters.xTraceId);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ // oauth required
+ headerParameters["Authorization"] = await this.configuration.accessToken("firefly_iii_auth", []);
+ }
+
+ if (this.configuration && this.configuration.accessToken) {
+ const token = this.configuration.accessToken;
+ const tokenString = await token("local_bearer_auth", []);
+
+ if (tokenString) {
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
+ }
+ }
+ const response = await this.request({
+ path: `/v1/insight/income/no-category`,
+ method: 'GET',
+ headers: headerParameters,
+ query: queryParameters,
+ }, initOverrides);
+
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(InsightTotalEntryFromJSON));
+ }
+
+ /**
+ * This endpoint gives a summary of the income received by the user, including only income with no category.
+ * Insight into income, without category.
+ */
+ async insightIncomeNoCategory(requestParameters: InsightIncomeNoCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise