Commit Graph

10 Commits

Author SHA1 Message Date
Mateusz Filipowicz
aa188a6faa feat: add API v2 support by adding APGroup and DNSRecord resource handling with generated code (#23)
* feat: add API v2 support by adding APGroup and DNSRecord resource handling with generated code

* fix tests
2025-02-17 15:39:54 +01:00
Mateusz Filipowicz
dca894e8e7 feat: use Client interface instead of client struct when interacting with UniFi SDK (#21)
* feat: use Client interface instead of client struct when interacting with UniFi SDK

Breaking change!

* chore: linting

* chore: linting
2025-02-17 09:38:41 +01:00
Mateusz Filipowicz
fadc5ada8b feat: add client customization option (#20)
* feat: add client customization

* chore: fix linting

* feat: allow excluding client function by resource name
2025-02-16 23:00:05 +01:00
Mateusz Filipowicz
5a403dbb39 feat: simplified generated resources code customizations with yaml file config (#17)
* feat: simplified generated code customizations with yaml file config

* chore: apply linting
2025-02-12 09:18:44 +01:00
Mateusz Filipowicz
bb21419c0e test: add comprehensive testing of codegen (#14) 2025-02-12 00:10:46 +01:00
Mateusz Filipowicz
6016a3d34a feat: add code generation for Unifi client interface (#11)
* feat: add code generation for Unifi client interface

* chore: apply linter hints

* chore: add tests

* fix: nondeterministic client function signature due to iteration of map params

* chore: add move version tests

* chore: add more generator tests

* chore: lint
2025-02-11 16:28:29 +01:00
Mateusz Filipowicz
53bb1a13b9 feat: generate fields validation and use it when sending requests to API (#7)
* feat: generate fields validation and use it when issuing requests to API with soft (default) or hard modes

* chore: apply linter fixes

* feat: enable field validation on int fields

* feat: add validation for ^[\w]+$ fields

* feat: add validation for MAC address fields

* fix: trim wrappers for all comments

* feat: add validation for IPv4, IPv6 and IP(IPv4/IPv6) fields

* feat: add validation for numeric, non-zero based fields

* fix: one of validation can contain dot (.) sign in values

* feat: add second notation of MAC address validation

* fix: one of validation can start with ^( and end with )$

* feat: add option to disable validation and use soft validation by default

* chore: fix test

* docs: add readme about client-side validation
2025-02-09 21:08:21 +01:00
Mateusz Filipowicz
e99645cf93 fix: renamed generator template to use ErrNotFound instead of NotFoundError 2025-02-09 02:07:44 +01:00
Mateusz Filipowicz
f79f21c4ad feat: new, more customizable client supporting API Key and user/password authentication 2025-02-09 01:51:47 +01:00
Mateusz Filipowicz
e629288cba feat(codegen): rename "fields" to "codegen" for more meaningful naming 2025-02-07 17:42:05 +01:00