-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Adds async reactor documentation #76
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
docs/api/reactors/reactor-errors.mdx
Outdated
When integrating with an external API within a reactor, we strongly recommend handling all vendor-specific errors | ||
that are documented by the vendor and translating into an appropriate Basis Theory error type. | ||
|
||
Some vendors express error scenarios via HTTP status codes, while others opt to return a generic status code such as `200 OK` while |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some vendors express error scenarios via HTTP status codes, while others opt to return a generic status code such as `200 OK` while | |
Some external APIs express error scenarios via HTTP status codes, while others opt to return a generic status code such as `200 OK` while |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhudec I actually wonder if this is fine now that i read everything. I've been trying to think about how I talk about these relationships vs how one of our end-users may.
Vendor may be fine now, although I'm wondering if we should be talking about it specifically as an API vs Vendor/3rd Party in our docs as that is really what they would be interacting with.
Thoughts? (for now I'm fine if you close this without adding it and we can talk more in Slack)
docs/api/reactors/reactors.mdx
Outdated
| `args` | false | _object_ | `null` | Arguments to provide to the reactor. These arguments must contain the declared [request parameters](/docs/api/reactors/reactor-formulas#reactor-formula-request-parameters) for the reactor formula. | | ||
| Parameter | Required | Type | Default | Description | | ||
| -------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `args` | false | _object_ | `null` | Arguments to provide to the reactor. These arguments must contain the declared [request parameters](/docs/api/reactors/reactor-formulas#reactor-formula-request-parameters) for the reactor formula. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still true? i thought we did away with "required" arguments?
Or does this mean that IF the reactor defines them, you MUST include them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the latter, we should be explicit about that here. I can suggest if that's the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, we don't require request parameters to be declared anymore
docs/api/reactors/reactors.mdx
Outdated
| -------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `args` | false | _object_ | `null` | Arguments to provide to the reactor. These arguments must contain the declared [request parameters](/docs/api/reactors/reactor-formulas#reactor-formula-request-parameters) for the reactor formula. | | ||
| `callback_url` | false | _string_ | `null` | Indicates that the reactor should be invoked asynchronously and the result delivered as a webhook to this URL. See [Asynchronous Reactors](/docs/concepts/what-are-reactors#asynchronous-reactors) for more info. | | ||
| `timeout_ms` | false | _int_ | `10000` | The maximum execution time for the reactor. Value must be between `10000` (10s) and `210000` (3.5m). Only supported for [Asynchronous Reactors](/docs/concepts/what-are-reactors#asynchronous-reactors) requests. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the value CANT be less than 10s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the way it is right now, that's correct...
docs/concepts/what-are-reactors.mdx
Outdated
@@ -95,6 +104,38 @@ curl "https://api.basistheory.com/reactors/5b493235-6917-4307-906a-2cd6f1a90b13/ | |||
}' | |||
``` | |||
|
|||
### Asynchronous Reactors | |||
|
|||
Reactors can be invoked asynchronously by providing a `callback_url` parameter within the [request](/docs/api/reactors#invoke-a-reactor). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reactors can be invoked asynchronously by providing a `callback_url` parameter within the [request](/docs/api/reactors#invoke-a-reactor). | |
Reactors are invoked asynchronously by providing a `callback_url` parameter within the [request](/docs/api/reactors#invoke-a-reactor). |
# [1.32.0](v1.31.0...v1.32.0) (2023-02-21) ### Features * Adds async reactor documentation ([#76](#76)) ([4fb1ded](4fb1ded))
🎉 This PR is included in version 1.32.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Testing required outside of automated testing?
Screenshots (if appropriate):
Rollback / Rollforward Procedure
Reviewer Checklist