Skip to content

Mermaid diagrams from images #124

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

Merged
merged 7 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed fern/docs/img/customization-stage-diagram.png
Binary file not shown.
Binary file removed fern/docs/img/customization-stage-transition.png
Binary file not shown.
Binary file removed fern/docs/img/customization-versioning.png
Binary file not shown.
Binary file removed fern/docs/img/diagram_4.png
Binary file not shown.
Binary file removed fern/docs/img/mermaid.png
Binary file not shown.
8 changes: 7 additions & 1 deletion fern/docs/pages/adaas/extraction-phases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ of the snap-in.

```mermaid
sequenceDiagram
%%{init: { "fontFamily": "Segoe UI" } }%%
%%{init: {
'theme': 'base',
'themeVariables': {
'fontFamily': 'Segoe UI',
'signalColor': '#7d7f7c',
'signalTextColor': '#7d7f7c'
}}}%%
actor user as User
participant gw as REST API Gateway
participant ad as Airdrop components
Expand Down
7 changes: 6 additions & 1 deletion fern/docs/pages/adaas/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ It enables developers to create external workers (extractors and loaders) to bri

```mermaid
flowchart TD
%%{init: { "fontFamily": "Segoe UI" } }%%
%%{init: {
'theme': 'base',
'themeVariables': {
'fontFamily': 'Segoe UI',
'lineColor': '#7d7f7c'
}}}%%
externalSystem[External system]
worker([Worker])
s3interact[s3interact]
Expand Down
24 changes: 23 additions & 1 deletion fern/docs/pages/create-accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,29 @@ The `rev-users.create` API is used to create [contacts](https://docs.devrev.ai/p
Just want to get a token and get started? This [tutorial](/about/authentication#generate-a-personal-access-token-pat) teaches you the fastest way to get a token.
</Callout>

![mermaid-diagram](../img/mermaid.png)
```mermaid
flowchart TD
%%{init: {
'theme': 'base',
'themeVariables': {
'fontFamily': 'Segoe UI',
'lineColor': '#7d7f7c'
}}}%%
acct-create[accounts.create]
exist(((Account is existing
'account ID')))
list[rev-orgs.list with
'account' filter]
get[rev-orgs.get with
'account ID']
display(((Get rev-org 'display_id')))
rev-user-create[Create a 'rev-user' under 'contact']
acct-create --> exist -->|Yes|get
exist -->|No|list
get --> display
list --> display
display --> rev-user-create
```

## Create an account

Expand Down
48 changes: 45 additions & 3 deletions fern/docs/pages/customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,23 @@ field in the old fragment points to the new fragment.
The diagram below shows the relationship between the fragments and how the versioning
scheme preserves the referential integrity.

![Fragment Versioning](../img/customization-versioning.png)
```mermaid Fragment versioning
flowchart LR
%%{init: {
'theme': 'base',
'themeVariables': {
'fontFamily': 'Segoe UI',
'lineColor': '#7d7f7c'
}}}%%
subgraph Versions
v1[Fragment v1]
v2[Fragment v2]
v1 --> v2
end
o1[Object 1] -.-> v1
o2[Object 2] -.-> v1
o3[Object 3] -.-> v2
```

### Object upgrades

Expand Down Expand Up @@ -453,7 +469,16 @@ instead.
Stages represent the different phases an object can be in during its lifecycle. For
example, an issue might go through the following lifecycle:

![Issue Lifecycle](../img/customization-stage-transition.png)
```mermaid Issue stages
flowchart LR
%%{init: {
'theme': 'base',
'themeVariables': {
'fontFamily': 'Segoe UI',
'lineColor': '#7d7f7c'
}}}%%
Backlog --> dev[In development] --> Completed
```

Customizing the stages allows you to tailor the object lifecycle to your organization's
specific requirements.
Expand Down Expand Up @@ -491,7 +516,24 @@ For example, _triage_ stage can transition to _backlog_ stage but not vice versa

Let's create a stage diagram for the _bug_ subtype:

![Stage Diagram](../img/customization-stage-diagram.png)
```mermaid Bug stages
flowchart LR
%%{init: {
'theme': 'base',
'themeVariables': {
'fontFamily': 'Segoe UI',
'lineColor': '#7d7f7c'
}}}%%
backl[**Backlog**
don:core:dvrv-us-1:devo/11FVC3ScK:stage/1]
dev[**In development**
don:core:dvrv-us-1:devo/11FVC3ScK:stage/2]
rca[**Needs RCA**
don:core:dvrv-us-1:devo/11FVC3ScK:stage/3]
compl[**Completed**
don:core:dvrv-us-1:devo/11FVC3ScK:stage/4]
backl --> dev --> rca --> compl
```

```curl {11}
curl --location 'https://api.devrev.ai/stage-diagrams.create' \
Expand Down
19 changes: 18 additions & 1 deletion fern/docs/pages/webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,24 @@ The types of events that can be received through webhooks are object mutation ev
Events are delivered concurrently in a semi-ordered (but not guaranteed) manner,
where object timestamps and versions enable you to determine the order of events for a particular object.

![diagram_4](../img/diagram_4.png)
```mermaid
sequenceDiagram
%%{init: {
'theme': 'base',
'themeVariables': {
'fontFamily': 'Segoe UI',
'signalColor': '#7d7f7c',
'signalTextColor': '#7d7f7c'
}}}%%
Note over Customer endpoint,DevRev: 1. Register webhook
Customer endpoint ->> DevRev: Webhook create request
DevRev -->> Customer endpoint: Webhook create response
Note over Customer endpoint,DevRev: 2. Verify webhook registration
DevRev ->> Customer endpoint: Verify request
Customer endpoint -->> DevRev: Echo challenge
Note over Customer endpoint,DevRev: 3. Receive webhook event
DevRev ->> Customer endpoint: Event POST
```

## Webhook event handling

Expand Down
6 changes: 3 additions & 3 deletions fern/versions/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ navigation:
typescript: "@devrev/api"
- section: Guides
contents:
- page: Object Customization
- page: Object customization
path: ../docs/pages/customization.mdx
- page: Custom Objects
- page: Custom objects
path: ../docs/pages/custom-objects.mdx
- page: Create accounts and contacts in DevRev
- page: Account creation
path: ../docs/pages/create-accounts.mdx
2 changes: 1 addition & 1 deletion fern/versions/public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ navigation:
- section: Guides
slug: guides
contents:
- page: Getting started with webhooks
- page: Webhooks
slug: webhooks
path: ../docs/pages/webhooks.mdx
- page: Restricted messages on a timeline
Expand Down
Loading