13 Commits

Author SHA1 Message Date
Rijk van Zanten
23de088037 Prevent webhooks from registering twice (#14163)
Fixes #13933
2022-06-28 15:40:59 -04:00
Rijk van Zanten
f89d98130b Add cross-instance messenger pubsub setup (#13651)
* Add cross-instance messenger pubsub setup

* Rely on messenger for reload activity

* Organize imports

* Undo unrelated change

* Add messenger env var reference
2022-06-01 14:22:39 -04:00
Nicola Krumschmidt
889668f972 Remove API extension types from the API (#11191)
There is little value in keeping these types inside the API package.
We should instead focus on improving the types in shared.
2022-01-20 22:19:52 +00:00
Nicola Krumschmidt
58a12d0f0e Align webhook payload with new hooks implementation (#10272)
Fixes #9518
2021-12-03 10:31:21 -05:00
Nicola Krumschmidt
3d0e086c55 Rework hook registration (#8027)
* Rework hook registration

* Remove event and action fields from hook payloads

* Move "error" action to "request.error" filter

* Emit meta and context objects in filters and actions

* Run filters sequentially

* Update hook templates

* Fix CLI hook test

* Also emit `<collection>.items.crud` when emitting `items.crud`.

* Update hook docs

Co-authored-by: Oreilles <oreilles.github@nitoref.io>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-03 17:18:56 -04:00
Jakob
15b875728b Add configurable headers for webhooks (#8855)
* Add configurable headers for webhooks

* Update api/src/database/migrations/20211016A-add-webhook-headers.ts

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-10-29 10:52:44 -04:00
Nicola Krumschmidt
d64ca14348 Explicitly set catch parameters to any type (#7654)
This fixes not being able to build the repo due to type issues
introduced by the Typescript 4.4 option "useUnknownInCatchVariables",
which is enabled by default in strict mode.
2021-08-27 10:33:30 -04:00
Rijk van Zanten
e96c77a819 Don't send sensitive data in webhooks (#6350)
Fixes #6246
2021-06-17 11:13:31 -04:00
Rijk van Zanten
77e00b7db4 Don't initialize database on file require (#6003) 2021-06-02 11:41:42 -04:00
rijkvanzanten
801e868554 Fix remaining eslint errors
h/t @paescuj
2021-04-29 15:55:12 -04:00
Pascal Jufer
acd41eb0be Syntax fixes (#5367)
* Declare return types on functions

And a very few other type related minor fixes

* Minor syntax fixes

* Remove unnecessary escape chars in regexes
* Remove unnecessary awaits
* Replace deprecated req.connection with req.socket
* Replace deprecated upload with uploadOne
* Remove unnecessary eslint-disable-next-line comments
* Comment empty functions / catch or finally clauses
* Fix irregular whitespaces
* Add missing returns (null)
* Remove unreachable code
* A few logical fixes
* Remove / Handle non-null assertions which are certainly unnecessary (e.g. in
tests)
2021-04-29 12:11:43 -04:00
Igor Savin
7cddb458cb Run prettier across app and api 2020-12-08 02:22:00 +02:00
rijkvanzanten
8cbdfb409b Use prefetched schema info 2020-11-09 17:13:48 -05:00