This has several breaking changes for v2:
1. No support for following methods which were implicitly present in
default namespace.
- run_doc_method
- ping
- web_logout
- logout
- uploadfile
- upload_file
- download_file
This lets us create three types of APIs:
- Document APIs that operate on documents
- DocType APIs that operate on collections - list, count, search
- Method APIs that are RPC calls
Preserves complete path just like before. This broke oauth as oauth code
was expecting 4th part in path even though it's never been supported in
API methods
v1 and v2:
- Use path convertor to consume entire document which MIGHT contain `/`
- Drop string convertor, as it's the default
- Dont merge slashes - avoid consuming something that's part of name
v2:
- `SI/BLAH/BLAH/submit` is not simple to parse without ambiguitity
- `SI/BLAH/BLAH/method/submit` removes ambiguitity for 99.99% cases.
* fix: validation permission on `tag` creation
* refactor: apply checks on all operations
Add/remove both are controlled by update
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
* refactor!: Drop handling for SQL queries
This hasn't been supported in really long time, no need to check that
use cases.
It will still fail but with no special error message.
* fix: Catch all import related errors
* fix!: Use last query from hooks
* refactor!: Return search results like any other function
Search results are returned in `results` key which is incosistent from
most other functions
* refactor: simplify search_link
* fix: sync doctype layout on update standard field
When standard field is deleted & it is not updated in the doctype layout,
Error occurs as it will try to render fields that doesn't exist
and layout won't render.
to fix this, sync doctype layout on update standard field
* refactor: use savepoint decorator
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
Meta order in most cases is default "modified" which doesn't quite help.
idx is # of times a document is referred to somewhere else, which is
more likely to be relevant.
When `locate` returns 0 it's shown on top instead it should be shown
last or not shown at all.
This is math hack to avoid using any complex SQL functionality which
isn't allowed in DB query.