Skip to content

Commit

Permalink
chore: #1277 Update wording on the Webhooks page in the Developers Po…
Browse files Browse the repository at this point in the history
…rtal (#1279)
  • Loading branch information
trankhacvy authored May 19, 2020
1 parent 7d6f757 commit dacb9af
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,22 @@ exports[`DeveloperWebHooks should match a snapshot 1`] = `
</Component>
<Component>
<Component>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Labore excepturi aliquam dolor, dolore placeat molestias illum quod quasi nihil. Modi consectetur praesentium sint quod qui quos soluta repellat porro minus.
Our webhooks system allows your application to directly subscribe to events happening in our customers data. Rather than needing to make API calls to poll for new information, a webhook subscription can be created to allow Reapit Foundations to send a HTTP request directly to your endpoints that you configure here.
</Component>
<Component>
This system is designed to flexibly work with how your application is built and deployed. If you wish, you can set up a single endpoint to catch all topics for all customers. Alternatively, you may wish to set up a different webhook subscription per topic or per customer.
</Component>
<Component>
For more information about Webhooks, please see our
<a
className={[Function]}
href="https://foundations-documentation.reapit.cloud/api/api-documentation#webhooks"
rel="noopener noreferrer"
target="_blank"
>
webhooks documentation
</a>
</Component>
<Formik
enableReinitialize={true}
Expand Down Expand Up @@ -49,7 +64,22 @@ exports[`DeveloperWebHooks should match a snapshot 2`] = `
</Component>
<Component>
<Component>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Labore excepturi aliquam dolor, dolore placeat molestias illum quod quasi nihil. Modi consectetur praesentium sint quod qui quos soluta repellat porro minus.
Our webhooks system allows your application to directly subscribe to events happening in our customers data. Rather than needing to make API calls to poll for new information, a webhook subscription can be created to allow Reapit Foundations to send a HTTP request directly to your endpoints that you configure here.
</Component>
<Component>
This system is designed to flexibly work with how your application is built and deployed. If you wish, you can set up a single endpoint to catch all topics for all customers. Alternatively, you may wish to set up a different webhook subscription per topic or per customer.
</Component>
<Component>
For more information about Webhooks, please see our
<a
className={[Function]}
href="https://foundations-documentation.reapit.cloud/api/api-documentation#webhooks"
rel="noopener noreferrer"
target="_blank"
>
webhooks documentation
</a>
</Component>
<Formik
enableReinitialize={true}
Expand Down
23 changes: 20 additions & 3 deletions packages/marketplace/src/components/pages/developer-webhooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import WebhookEditModal from '../ui/webhook-edit-modal'
import { selectDeveloperApps } from '@/selector/developer'
import WebhookTestModal from '../ui/webhook-test-modal'
import styles from '@/styles/elements/link.scss?mod'
import linkStyles from '@/styles/elements/link.scss?mod'

export const CreatedCell = ({ cell: { value } }): ReactElement[] => {
return value.map((line, index) => <p key={index}>{line}</p>)
Expand Down Expand Up @@ -203,9 +204,25 @@ export const DeveloperWebhooks = ({
<H3>Manage Webhook Subscriptions</H3>
<FormSection>
<FormSubHeading>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Labore excepturi aliquam dolor, dolore placeat
molestias illum quod quasi nihil. Modi consectetur praesentium sint quod qui quos soluta repellat porro
minus.
Our webhooks system allows your application to directly subscribe to events happening in our customers data.
Rather than needing to make API calls to poll for new information, a webhook subscription can be created to
allow Reapit Foundations to send a HTTP request directly to your endpoints that you configure here.
</FormSubHeading>
<FormSubHeading>
This system is designed to flexibly work with how your application is built and deployed. If you wish, you
can set up a single endpoint to catch all topics for all customers. Alternatively, you may wish to set up a
different webhook subscription per topic or per customer.
</FormSubHeading>
<FormSubHeading>
For more information about Webhooks, please see our{' '}
<a
className={linkStyles.link}
href="https://foundations-documentation.reapit.cloud/api/api-documentation#webhooks"
target="_blank"
rel="noopener noreferrer"
>
webhooks documentation
</a>
</FormSubHeading>
<Formik initialValues={{ applicationId: '' }} enableReinitialize={true} onSubmit={() => {}}>
{() => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ exports[`WebhookTestModalBody WebhookTestModalBody should match snapshot 1`] = `
<React.Fragment>
<Unknown>
<p>
To test your Webhook subscription, please select a ‘Subscription Topic’ below:
To test your Webhook subscription, please select a subscription topic and an example payload for that topic will be sent to the configured URL. For more information, see 'testing webhook link TBC'
</p>
</Unknown>
<Unknown
Expand Down
15 changes: 12 additions & 3 deletions packages/marketplace/src/components/ui/webhook-edit-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
import { WebhookModal, CustomerItem, TopicItem } from '@/reducers/webhook-edit-modal'
import { selectTopics, selectWebhookData, selectLoading, selectCustomers } from '@/selector/webhook-edit'
import { isValidHttpsUrl } from '@/utils/validate'
import linkStyles from '@/styles/elements/link.scss?mod'

const CREATE_MODAL = {
title: 'Add New Webhook',
Expand Down Expand Up @@ -204,10 +205,18 @@ export const WebhookModalInner: React.FunctionComponent<WebhookModalInnerProps>
<Form>
<Content>
<p>
You can create a Webhook to receive notifications from the topics that you choose to subscribe it
to. You can receive notifications for any customer that has installed your application. For more
information about Webhooks, please see our{' '}
Webhooks are configured here to allow your application to receive real-time notifications about
the topics you choose to subscribe it to. A single webhook subscription can receive notifications
for multiple topics so long as your application has been granted the required permissions.
</p>
<p>
Webhooks subscriptions can be set up for any customer who has installed your application.
Additionally, you can choose ‘SBOX’ to listen for sandbox environment notifications.
</p>
<p>
For more information about Webhooks, please see our{' '}
<a
className={linkStyles.link}
href="https://foundations-documentation.reapit.cloud/api/api-documentation#webhooks"
target="_blank"
rel="noopener noreferrer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ export const WebhookTestModalBody: React.FunctionComponent<WebhookTestModalBodyP
body={
<>
<Content>
<p>To test your Webhook subscription, please select a ‘Subscription Topic’ below:</p>
{/* webhook link will be provide later. https://github.com/reapit/foundations/issues/1277 */}
<p>
To test your Webhook subscription, please select a subscription topic and an example payload for that
topic will be sent to the configured URL. For more information, see &apos;testing webhook link TBC&apos;
</p>
</Content>
<SelectBox id="topicId" name="topicId" labelText="Subscription Topics" options={topicOptions} required />
</>
Expand Down

0 comments on commit dacb9af

Please sign in to comment.