Skip to content

Commit

Permalink
Big content push and various adjustments and tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mattvagni committed Nov 18, 2023
1 parent de562f3 commit 6ff4b0f
Show file tree
Hide file tree
Showing 67 changed files with 202 additions and 193 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.tabSize": 2
}
18 changes: 18 additions & 0 deletions custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* Global font weight adjustments */
.font-extrabold {
font-weight: 600;
}

.font-semibold {
font-weight: 500;
}

/* By default titles have tight leading, this removes this. */
.tracking-tight {
letter-spacing: 0;
}

/* Links that are in the content of the page */
.prose :where(a):not(:where([class~='not-prose'] *)) {
font-weight: 500;
}
39 changes: 16 additions & 23 deletions pages/attachments.mdx → docs/api-reference/attachments.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'File Attachments'
description: "When using Plain's API to send emails or [create threads](/graphql/threads/create), you can add file attachments."
title: 'Attachments'
description: 'How to upload attachments programatically for messages and events in Plain.'
---

This page outlines how to upload attachments programatically.
Expand All @@ -24,25 +24,21 @@ To try this, you will need an [API key](/graphql/authentication/) with the follo
- `c_XXXXXXXXXXXXXXXXXXXXXXXXXX` is the customer id you are uploading the attachment for. **Remember to replace this!**

<Tabs>
<Tab title="Typescript SDK">

<Snippet file="typescript-sdk/create-attachment-url.mdx" />

Which would console log something like this:

<Snippet file="typescript-sdk/create-attachment-url-response.mdx" />
<Tab title="Typescript SDK">

<Snippet file="typescript-sdk/create-attachment-url.mdx" />
Which would console log something like this:
<Snippet file="typescript-sdk/create-attachment-url-response.mdx" />
</Tab>

<Tab title="GraphQL">
The GraphQL mutation to create an attachment upload URL is the following:

<Snippet file="graphql/create-attachment-url.mdx" />

The GraphQL mutation to create an attachment upload URL is the following:
<Snippet file="graphql/create-attachment-url.mdx" />
</Tab>
</Tabs>

</Step>

<Step title="Uploading the attachment">
In the `AttachmentUploadUrl` we created in the previous step we get back 2 fields which are needed to actually upload our attachment:

Expand All @@ -54,19 +50,16 @@ To try this, you will need an [API key](/graphql/authentication/) with the follo
Here is some example code showing how you would do this in the Browser and from a Node server:

<Tabs>
<Tab title="Browser">

<Snippet file="attachments/upload-attachment-browser.mdx" />

</Tab>
<Tab title="Node">

<Snippet file="attachments/upload-attachment-node.mdx" />

</Tab>
<Tab title="Browser">
<Snippet file="attachments/upload-attachment-browser.mdx" />
</Tab>
<Tab title="Node">
<Snippet file="attachments/upload-attachment-node.mdx" />
</Tab>
</Tabs>

</Step>

</Steps>

## Limitations
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions docs/api-reference/graphql/api-explorer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'API Explorer'
url: 'https://app.plain.com/developer/api-explorer/'
---
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ An example thread looks like this:
explorer](https://app.plain.com/developer/api-explorer) to discover the full schema of threads.
</Note>

<ThreadsResponse />
<Snippet file="typescript-sdk/threads-response.mdx" />
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
title: 'Typescript SDK'
icon: 'link'
url: 'https://github.com/team-plain/typescript-sdk/'
---
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pages/introduction.mdx → docs/introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'Getting started with Plain'
title: 'Introduction'
description: 'Plain is the customer support tool for technical B2B products.'
---

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6ff4b0f

Please sign in to comment.