Commit graph

77 commits

Author SHA1 Message Date
Zach Daniel
986e08e0c2 fix: properly compare against decimal values
improvement: support floats & decimals in the `compare` validation
2022-10-21 10:46:46 -04:00
Nelson Bassett
8378722244
improvement: Improve error when actions reject and accept keys overlap (#405)
* Test for overlapping action keys, and initial solution.

* Merged ValidateAcceptRejectpOverlap transformer into existing DefaultAccept transformer.

* Corrected formatting using mix format.
2022-10-09 18:05:54 -04:00
Zach Daniel
e9ca762e34 improvement: update to latest spark
chore: clean up tests & remove warnings
2022-10-08 14:00:08 -04:00
George Rodrigues
1f685a1413
docs: fix typos (#402) 2022-10-04 16:01:42 -04:00
Juha
fdebbeb242
improvement: Forbid reserved field names (#388)
Co-authored-by: Juha Lehtonen <juha.lehtonen@relexsolutions.com>
2022-10-03 16:19:16 -04:00
SpaceEEC
ace38cd31f
improvement: validate accepted and rejected attributes in actions (#395) 2022-10-03 12:16:53 -04:00
Zach Daniel
3b803d4c55 fix: various fixes with complex policy statements
improvement: simplify filter statements further
improvement: don't overconstraint filters on related data
test: get started on some more complex policy tests
2022-09-25 13:21:17 -04:00
Zach Daniel
1f6fb8d7af chore: fix tests 2022-09-20 19:44:04 -04:00
Zach Daniel
e36f8c3e59 improvement: add filterable? option to relationships
improvement: add data layer capability for aggregate relationships & filter relationships
improvement: add guide on manual relationships
2022-09-13 13:53:05 -04:00
Zach Daniel
f9941a6c75 improvement: update spark, use new transformer style 2022-08-28 19:27:44 -06:00
Zach Daniel
6c79519b6c improvement: make long-awaited DSL name changes 2022-08-28 19:27:44 -06:00
Zach Daniel
a5f616812b improvement: replace Ash DSL underpinnings with Spark 2022-08-28 19:27:44 -06:00
Zach Daniel
98a64577d9 improvement: add || and && operators
improvement: sort parsing helpers
test: fix flaky test
2022-07-19 19:15:23 -04:00
zimt28
81c085b9a3
improvemtn: Add accept_default option (#351)
* Add accept_default option
2022-07-19 10:03:23 -04:00
Zach Daniel
40904cae80 fix: add back in writable? option to relationships, and add attribute_writable? to belongs_to 2022-07-06 08:30:13 -04:00
Simon Bergström
4273a5d23a
improvement: added options to the built-in function relate_actor/1 (#332) 2022-05-28 21:21:14 -04:00
Zach Daniel
02b1194062 chore: fix tests/transformers 2022-05-28 11:22:43 -04:00
Zach Daniel
74cc7c4ad5 fix: don't ignore lexical tracker on modules in DSL
improvement: add manual read actions
fix: don't treat single actions of a type as primary
2022-04-28 18:08:00 -04:00
Zach Daniel
dbe2e9a818 fix: flaky test issue 2022-04-07 01:52:59 -04:00
Joe Cole
6dcbe26abe
fix: Enforce unique action names (#308)
Co-authored-by: Joe Cole <{ID}+{username}@users.noreply.github.com>
2022-04-07 01:14:07 -04:00
Zach Daniel
be9e564d57 chore: fix identity docs/tests 2022-04-06 12:22:34 -04:00
Zach Daniel
4fc53baf5f improvement: add eager validate identities
improvement: percolate `nil` values in operators in ash expresion language (like SQL)
chore: more docs work
2022-04-06 12:00:32 -04:00
Zach Daniel
022708c6b5 improvement: add api option to relationships
improvement: make default actions and primary actions far more explicit

this begins the official 2.0.0 work
2022-04-04 01:48:37 -04:00
tlietz
da5306c773
improve: Provide api read error message on no data set (#302) 2022-03-29 21:07:44 -04:00
tlietz
12cfe0d848
improvement: validates attributes and relationships have unique names (#300) 2022-03-27 20:00:19 -04:00
Zach Daniel
a53b61ddf4 feat: add Ash.Flow
feat: support recursive DSL entities.
improvement: unimport to avoid name collisions in nested DSLs
2022-03-15 17:42:29 -04:00
Zach Daniel
ff756b72a7 improvement: deprecation!
A deprecation warning will be shown at compile time to illustrate
a change from listing all of your resources in an api to listing
them in a registry and connecting that registry to the api
2021-10-07 02:41:02 -04:00
Zach Daniel
13e06524a7 improvement: add belongs_to attributes *after* the others 2021-07-26 20:55:44 -04:00
Zach Daniel
4ea0e62a79 chore: ensure compiled in a different place
chore: credo
2021-07-22 16:26:02 -04:00
Frank Dugan III
8ba1a9a4c8
feat(Ash.Resource.Info): add &public_field/2 helper (#254)
feat(Ash.Resource.Info): add &sortable?/3 helper
2021-07-22 16:23:54 -04:00
kernel-io
35af220d9d
feat: add compare validator (#242)
Co-authored-by: David Culina <git@omnium.co>
2021-06-01 13:32:22 -04:00
Zach Daniel
593b111069 improvement: add read_action option
feat: rework lateral joins for many to many performance boost
2021-05-03 16:21:29 -04:00
Zach Daniel
e353ea49c3 fix: allow api.load/2 to load calculations
improvement: add `allow_nil_input` to create actions for api layers
improvement: add `load/1` builtin change
feat: change `get?: true` interface functions to raise on `nil`
2021-04-13 15:49:42 -04:00
Michael St Clair
6805d431ac
improvement: add sum aggregate (#221) 2021-04-04 16:00:53 -04:00
Zach Daniel
72b5a57a25 feat: functional interface on the Api module
feat: resource aliases
improvement: require completely unique action names
2021-03-08 00:59:32 -05:00
Zach Daniel
d42c778a0d improvement: many compile time fixes via code splitting
feat: refactored manage_relationship options/behavior
2021-02-22 20:44:03 -05:00
zimt28
db533450ed
improvement: Guess destination_field for has many relationships (#187) 2021-02-15 13:32:44 -05:00
Darren Black
983a711837
improvement: Implement string length validation (#183)
Co-authored-by: Darren Black <darren@ifixsystems.com.au>
2021-02-08 18:16:32 -05:00
Zach Daniel
bb91fd4bc7 fix: add action filters in for_read/3
fix: don't let local runner processes mix up messages

fix: runtime filter filters properly
2021-01-22 16:41:32 -05:00
Zach Daniel
f6f5d194bf feat: freeform expressions
feat: validatiosn in actions

feat: query arguments

feat: add `Ash.Query.for_read/3`

feat: return changeset with API errors

feat: add case insensitive string `CiString`/`:ci_string`

feat: support `context/1` and `arg/1` in filter templates

feat: support targeting notifications with the `for` option

feat: add `ago/2` query function

feat: add basic arithmetic operators (+, *, -, /)

feat: `sensitive?` option for attributes

feat: `sensitive?` option for arguments

feat: `private` arguments, which can’t be set using `for_<action>`

feat: add `prevent_change` which will erase changes just before the changeset is committed

feat: add `match?` validation that supports a custom error message

feat: add `interval` type to support `ago/2` function

feat: add `url_encoded_binary` type

feat: add `function` type

improvement: `changing?` is now a validation

improvement: add `Transformer.get_persisted/3`

improvement: add `api` field to `Notification`

improvement: standardize errors, add `to_error_class`

improvement: use `Comp` everywhere

Improvement: use action on changeset if set by `for_<action_type>`

improvement: `action_failed?` field on change sets

improvement: remove ability for data layers to add operators (for now at least)

Improvement: Changeset.apply_attributes/2 now returns an error tuple

Improvement: add a bunch of new/informative errors

improvement: runtime filter now uses left join logic (a naive implementation of it)

improvement: support more filter templates in resources

Improvement: basic/naive type system for operators/functions

Fix: properly expand module aliases for options w/o compile time dependency

chore(engine): track changeset changes for the request with `manage_changeset?: true`
2021-01-21 15:22:50 -05:00
zimt28
31cb4f4be3
improvement: Improve attribute defaults (#164) 2021-01-12 15:40:55 -05:00
Zach Daniel
6a26a583de
feat: Add Embedded Resources (#170) 2021-01-12 15:05:56 -05:00
Zach Daniel
250f51f14e chore: formatting 2020-12-30 12:53:24 -05:00
Zach Daniel
c1767e79b2 improvement: default actions 2020-12-30 11:55:40 -05:00
Zach Daniel
c6ea07896b test: various testing improvements 2020-12-01 00:51:24 -05:00
Zach Daniel
0e3333c05f chore: update tests 2020-11-30 23:23:34 -05:00
Zach Daniel
7c977d10c5 chore: update calculation tests 2020-11-30 23:18:39 -05:00
Kyle Nguyen
c732099240
feat: Add property: private? for attributes, relationships, aggregates, and calculations (#140) 2020-11-02 15:33:14 -05:00
WolfDan
1d6066f247
fix: add module name to errors (#127) 2020-10-05 10:40:22 -04:00
mario
6d719516c2
feat: added description for missing resources (#117) 2020-09-25 08:20:58 -04:00