Commit Graph

16 Commits

Author SHA1 Message Date
Pascal Jufer
4a2ea9a03e Add "require('axios')" in API hooks examples (#6360)
* Docs: Add "require('axios')" in API hooks examples

* Move "require('axios')" to top
2021-06-18 09:28:12 -04:00
Thijs-Jan
e4b9bf06a0 Add support for read hooks on items (#6341)
* Add emitter on item read

* Add performance warning to docs

* Make result instead of query the payload
2021-06-17 10:56:52 -04:00
Juan Carlos Blanco Delgado
5826fd6110 Adding an example to cron hook (#6188)
* Adding an example to cron hook

* Update docs/guides/api-hooks.md

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-06-10 16:16:33 -04:00
Ben Haynes
32737ba884 Update api-hooks.md (#6135) 2021-06-08 10:14:00 -04:00
Rijk van Zanten
1e4850f53a Add support for CRON hooks (interval) (#6116)
* Install node-cron

* Support CRON hooks

* Document interval hook

* Fix package-lokc
2021-06-07 16:57:32 -04:00
Rijk van Zanten
a64a5a124a Add files.upload hook (#5334)
* Allow events to be disabled

* Add files.upload, silence create/update on upload

Fixes #4728

* Document files.upload hook
2021-04-28 17:54:03 -04:00
Rijk van Zanten
d25c35fee7 Add MailService (#5265)
* Create MailService

Fixes #5229, ref #3372, #4664, #4858, #5090, #3104, #3465, #2774, #3741

* Fix path to templates extensions

* Add mailservice example to hooks docs
2021-04-26 17:55:34 -04:00
Pyll Gomez
c3ef71298c Add oauth hook (#5045)
* Rotate JPG image on upload #4206

* fixes #3949 width/height generated for gif and tif

* API hooks for event added for auth.login #4079

* updated doc for api hooks for new auth.login event

* Style tweaks

* Update docs

* Tweak docs some more

* Spelling error

* Allow non-required flags and pass to hook

* SDK - Persistent login refresh fixes #4113

* Fixed #4145 SDK, Token Expired error

* Spell check

* Docs Spell check

* Docs Spell check

* Docs Spell check

* update docs for sdk-js

* To delete all expired session from db on login

* corrected the condition for the delete

* changed the from Date.now to new date .

* Move it inline

* Fixes #4653

* added docs and cleaned up the hooks payload

* use req.accountability

* added req.params.provider to payload

* provide scope for login

* docs updated for oauth hook

* Update api/src/controllers/auth.ts

* updated provider to redirect and docs

* added payload

* Make schema available in redirect hook

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-04-16 15:51:15 +00:00
rijkvanzanten
3eaa375952 Provide getSchema function in hook/endpoint registration function
Fixes #4621
2021-03-22 20:13:49 -04:00
rijkvanzanten
2a71f0c0dd Pass current knex trx instance to hook resolver functions
Closes #4558
2021-03-17 22:07:58 -04:00
Pyll Gomez
aeb4ec0472 API hooks for event added for auth.login (#4255)
* Rotate JPG image on upload #4206

* fixes #3949 width/height generated for gif and tif

* API hooks for event added for auth.login #4079

* updated doc for api hooks for new auth.login event

* Style tweaks

* Update docs

* Tweak docs some more

* Spelling error

* Allow non-required flags and pass to hook

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-02-24 10:37:13 -05:00
Valentino Stillhardt
12a7c409a7 Update api-hooks.md (#4250)
I think it's worth mentioning that `items.create` is the same as the old (v8) `items.create.after`.
I personally tried putting .after and it didn't call, only to realize that it's not needed anymore.
2021-02-23 14:29:01 -05:00
Ben Haynes
c5f97b2a83 Update api-hooks.md 2021-02-23 11:01:13 -05:00
Rijk van Zanten
0beaf56dc3 Add on-error hook (#4233)
* Add on-error hook

Closes #2906

* Ignore unspecified listeners

* Document error hook
2021-02-22 19:00:53 -05:00
WoLfulus
b8e7c80b72 Application initialization events (#3680)
* Adds `not_found` hook

* Separate hooks and endpoints initialization process

* Adds additional application events

* Remove unused import

* Change the event order to accound for notFound and errorHandler

* Change emitAsync.catch to use the emitAsyncSafe function

* Updated docs, reordered table by lifecycle and usage
2021-02-08 12:30:09 -05:00
Rijk van Zanten
817ccf3620 Overhaul docs (#3951)
* Add Quickstart Guide

* Update installation

* Remove unused files

* Update support/backing

* Tweaks in concepts

* Setup file structure for API reference 2.0

* Setup page layout for reference

* Add clean-urls plugin

* getting started updates

* Finish authentication rest

* getting started updates

* Render stylus in 2 spaces

* Various

* Various

* Finish activity docs

* Add collections reference

* Add extension reference

* concepts updates

* Fields/tweaks

* Add files doc

* Add revisions

* concepts docs

* More api reference

* Finish rest api reference (finally)

* initial concepts

* More things

* Add assets api ref

* Move sections from file to assets

* Add environment variables

* contributing docs

* Add field transforms page

* Left align table headers

* concept links

* Add API config

* Fix mobile nav

* Add migrating a project

* doc link fixes

Co-authored-by: Ben Haynes <ben@rngr.org>
2021-02-05 18:51:54 -05:00