Skip to content

Commit

Permalink
feat: update doc titles and meta descriptions (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinperaza authored Apr 17, 2023
1 parent e1e705b commit 9f2c7d7
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 81 deletions.
51 changes: 31 additions & 20 deletions docs/blueprints/migrations/migrate-off-basis-theory.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
title: Migrate off Basis Theory
description: This guide will walk you through moving your PCI compliant data to another compliant service provider and options to move all of your non-PCI data into your database or another vault.
toc_max_heading_level: 2
---

Expand All @@ -11,8 +13,12 @@ We know business goals and technical needs change over time. We get it. More imp
If you need help with your migration plan - [please reach out](https://basistheory.com/contact).

<Alert type={Alerts.WARNING}>
<b>Warning: Moving your compliant data</b><br/>
Before migrating data out of Basis Theory's systems, you should confirm that the desired location meets all requirements for the underlying data type. For example, moving your card data off of Basis Theory will require you or your new provider to be Payments Card Institute (PCI) Level 1 compliant.
<b>Warning: Moving your compliant data</b>
<br />
Before migrating data out of Basis Theory's systems, you should confirm that
the desired location meets all requirements for the underlying data type. For
example, moving your card data off of Basis Theory will require you or your
new provider to be Payments Card Institute (PCI) Level 1 compliant.
</Alert>

## Create an Application
Expand All @@ -38,28 +44,29 @@ Using our Proxy is the simplest path to migrating your data to another API-based
The following example provides a pattern for proxying your plaintext data to a new provider and storing your new provider's identifiers in your database. _The array of tokens is an example of data you've stored in your database - replace this by querying your database._

```javascript showLineNumbers
import axios from 'axios';
import axios from "axios";

async function migration() {

const rowsFromDatabase = [
{name: 'test', ssn: 'fc88408b-d031-49c6-abd9-9e53589a6091'},
{name: 'test', ssn: 'c35f271e-0338-45fb-a036-c36a0e290ab7'},
// .. more rows of data
{ name: "test", ssn: "fc88408b-d031-49c6-abd9-9e53589a6091" },
{ name: "test", ssn: "c35f271e-0338-45fb-a036-c36a0e290ab7" },
// .. more rows of data
];

rowsFromDatabase.forEach(async (row, i) => {
const token = await axios.post('https://api.basistheory.com/proxy',
const token = await axios.post(
"https://api.basistheory.com/proxy",
{
value: `{{${row.ssn}}}`,
format: 'UUID'
format: "UUID",
},
{
headers: {
'BT-PROXY-URL': '<https://api.new.provider/secure>',
'BT-API-KEY': 'key_here',
}
});
"BT-PROXY-URL": "<https://api.new.provider/secure>",
"BT-API-KEY": "key_here",
},
}
);

rowsFromDatabase[i].ssn = token.aliases[0].alias;
});
Expand All @@ -71,23 +78,27 @@ async function migration() {
### 2. Export all of your data {#export}

<Alert type={Alerts.WARNING}>
For Card data (PCI), you can only export if you are PCI Level 1 compliant and have submitted your Report on Compliance to Basis Theory. Please <a href="https://basistheory.com/contact">reach out</a> for help submitting your ROC. If you're looking to move to another PCI Level 1 provider, please view our Proxy or Reactor solution.
For Card data (PCI), you can only export if you are PCI Level 1 compliant and
have submitted your Report on Compliance to Basis Theory. Please{" "}
<a href="https://basistheory.com/contact">reach out</a> for help submitting
your ROC. If you're looking to move to another PCI Level 1 provider, please
view our Proxy or Reactor solution.
</Alert>

Depending on your situation, you may want to export your data directly into your database instead of moving directly to a new Tokenization provider. When you do this, you'll want to consider encrypting the data you're exporting to keep the security of your data at the same level Basis Theory has provided you.

The following example shows how you can use the [Retrieve a Token](/docs/api/tokens#get-a-token) endpoint to pull back tokens you have stored within your database. _The array of tokens is an example of data you've stored in your database - replace this by querying your database._

```javascript showLineNumbers
import {BasisTheory} from '@basis-theory/basis-theory-js';
import { BasisTheory } from "@basis-theory/basis-theory-js";

async function migration() {
const bt = await new BasisTheory().init('key_here');
const bt = await new BasisTheory().init("key_here");

const rowsFromDatabase = [
{name: 'test', ssn: 'fc88408b-d031-49c6-abd9-9e53589a6091'},
{name: 'test', ssn: 'c35f271e-0338-45fb-a036-c36a0e290ab7'},
// .. more rows of data
{ name: "test", ssn: "fc88408b-d031-49c6-abd9-9e53589a6091" },
{ name: "test", ssn: "c35f271e-0338-45fb-a036-c36a0e290ab7" },
// .. more rows of data
];

rowsFromDatabase.forEach(async (row, i) => {
Expand All @@ -101,4 +112,4 @@ async function migration() {

### 3. Reactors to move your data to a new provider {#reactors}

If the above two examples don't provide the flexibility you're needing as you switch providers, you can take advantage of our [Reactors](/docs/api/reactors). Reactors are serverless compute services allowing Node.js code (Reactor Formula) hosted in Basis Theory to be executed against your tokens completely isolated away from your existing application and systems.
If the above two examples don't provide the flexibility you're needing as you switch providers, you can take advantage of our [Reactors](/docs/api/reactors). Reactors are serverless compute services allowing Node.js code (Reactor Formula) hosted in Basis Theory to be executed against your tokens completely isolated away from your existing application and systems.
15 changes: 9 additions & 6 deletions docs/concepts/access-controls.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Access Controls
description: Access to data is limited by applying access controls to an Application via Permissions and Access Rules to ensure services and users only have access to the data they need.
sidebar_label: Access Controls
---

Expand Down Expand Up @@ -70,9 +71,11 @@ A short description of the Application describing its intended use, for example
- **Management**: Used with scripts or the [Basis Theory Terraform Provider](https://registry.terraform.io/providers/Basis-Theory/basistheory) to manage your Tenant's settings and services (Applications, Reactors, Proxy, etc) without logging into our Portal.

<Alert>
There are some <a href="#why-use-sessions">inherent risks</a> associated with embedding a public API key within a public-facing frontend application.
Take the time to understand these <a href="#why-use-sessions">risks</a> and consider using <a href="#what-are-sessions">sessions</a> within
your frontend applications to mitigate these risks.
There are some <a href="#why-use-sessions">inherent risks</a> associated with
embedding a public API key within a public-facing frontend application. Take
the time to understand these <a href="#why-use-sessions">risks</a> and
consider using <a href="#what-are-sessions">sessions</a> within your frontend
applications to mitigate these risks.
</Alert>

### Access Controls
Expand Down Expand Up @@ -222,9 +225,9 @@ if and how Token data will be returned from the API. If no matching rules are fo
access to the requested resource is denied with a `403 Forbidden` error.

<Alert type={Alerts.WARNING}>
Access Rules are currently only supported on Private and Public
Application types, and only control access to Token resources. Access Rules
are not supported on Management Applications at this time.
Access Rules are currently only supported on Private and Public Application
types, and only control access to Token resources. Access Rules are not
supported on Management Applications at this time.
</Alert>

Access Rules are comprised of the following properties:
Expand Down
4 changes: 3 additions & 1 deletion docs/concepts/what-are-reactors.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: What are Reactors?
description: A Reactor is a serverless compute service allowing Node.js code hosted in Basis Theory to be executed against your tokens completely isolated away from your application and systems.
sidebar_label: Reactors
---

Expand Down Expand Up @@ -45,7 +46,8 @@ module.exports = async function (req) {
```

<Alert title="Quickstart hint">
You can find a list of pre-defined Reactor Formulas for common integration scenarios within our{" "}
You can find a list of pre-defined Reactor Formulas for common integration
scenarios within our{" "}
<a href="https://portal.basistheory.com/reactors/formulas" target="_blank">
Portal
</a>
Expand Down
1 change: 1 addition & 0 deletions docs/concepts/what-is-the-proxy.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: What is the Proxy?
description: The Basis Theory Proxy allows you to use tokens with HTTP APIs without needing to access sensitive data directly within your systems. This enables solving both these problems securely while keeping your systems out of compliance scope.
sidebar_label: Proxy
---

Expand Down
1 change: 1 addition & 0 deletions docs/expressions/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Expressions
description: Explore the expression language used throughout the Basis Theory API.
hide_title: true
hide_table_of_contents: true
---
Expand Down
23 changes: 16 additions & 7 deletions docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Getting Started
description: Basis Theory provides APIs, SDKs, and all of the tools you need to make your sensitive data more secure and usable.
hide_title: true
sidebar_label: Getting Started
hide_table_of_contents: true
Expand Down Expand Up @@ -112,13 +113,21 @@ Blueprints are end-to-end guides around common use cases with the Basis Theory p
Guides for working with cards in order to meet <strong><i>95% of the compliance requirements</i></strong> of PCI in as little as <strong><i>5 minutes</i></strong>.
</BlueprintCard>

<BlueprintCard
href="/docs/blueprints/personal-information"
heading="Personal Information Blueprints"
img={<img src={PersonalInformationBlueprint} alt="Personal Information Blueprints" />}
>
Guides for collecting, processing, and revealing personal information while complying with data privacy regulations.
</BlueprintCard>
{" "}

<BlueprintCard
href="/docs/blueprints/personal-information"
heading="Personal Information Blueprints"
img={
<img
src={PersonalInformationBlueprint}
alt="Personal Information Blueprints"
/>
}
>
Guides for collecting, processing, and revealing personal information while
complying with data privacy regulations.
</BlueprintCard>

<BlueprintCard
href="/docs/blueprints/migrations"
Expand Down
7 changes: 4 additions & 3 deletions docs/sdks/_card-brands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Alert } from "@site/src/components/shared/Alert";
Supported card brands are defined in the table below:

| Brand | Identifier | Card Number Digits | CVC Digits |
|------------------|--------------------|--------------------|------------|
| ---------------- | ------------------ | ------------------ | ---------- |
| American Express | `american-express` | 15 | 4 |
| Diners Club | `diners-club` | 14, 16, 19 | 3 |
| Discover | `discover` | 16, 19 | 3 |
Expand All @@ -18,6 +18,7 @@ Supported card brands are defined in the table below:
| Visa | `visa` | 16, 18, 19 | 3 |

<Alert>
Some card brands have issued card numbers with multiple lengths. The <code>Card Number Digits</code> column
documents all acceptable card number lengths for the brand (in number of digits, excluding formatting characters).
Some card brands have issued card numbers with multiple lengths. The{" "}
<code>Card Number Digits</code> column documents all acceptable card number
lengths for the brand (in number of digits, excluding formatting characters).
</Alert>
13 changes: 9 additions & 4 deletions docs/sdks/web/javascript/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: JavaScript Elements SDK
description: The Basis Theory JavaScript SDK makes it easy to build secure web applications that collect or reveal sensitive data using Elements. Learn more.
sidebar_label: JavaScript Elements
toc_max_heading_level: 2
---
Expand Down Expand Up @@ -89,10 +90,10 @@ const bt = await new BasisTheory().init("test_1234567890", { elements: true });
// you can initialize it wherever it suits your workflow best
// here we are waiting for the window to load, to make sure BasisTheory instance
// has been injected in the window variable
window.addEventListener('load', async () => {
window.addEventListener("load", async () => {
try {
// global/window variable BasisTheory is an instance, but requires initialization
await BasisTheory.init('test_1234567890', { elements: true });
await BasisTheory.init("test_1234567890", { elements: true });
// use Elements
} catch (e) {
// handle errors that could happen while loading elements script
Expand All @@ -116,11 +117,15 @@ const bt = await new BasisTheory().init("test_1234567890", { elements: true });
| `elements` | false | _boolean_ | Boolean used to indicate whether the `BasisTheory` instance will have Elements capabilities. |

<Alert type={Alerts.WARNING}>
Elements are meant to be used in browser environments only. If you installed <code>BasisTheory.js</code> as a module, make sure the instance that loads elements runs on the browser-side code.
Elements are meant to be used in browser environments only. If you installed{" "}
<code>BasisTheory.js</code> as a module, make sure the instance that loads
elements runs on the browser-side code.
</Alert>

<Alert type={Alerts.WARNING}>
If you try to to use any Elements feature before calling <code>BasisTheory.init</code>, or before its Promise has been fulfilled, you will get an error.
If you try to to use any Elements feature before calling{" "}
<code>BasisTheory.init</code>, or before its Promise has been fulfilled, you
will get an error.
</Alert>

## Usage with TypeScript
Expand Down
Loading

1 comment on commit 9f2c7d7

@vercel
Copy link

@vercel vercel bot commented on 9f2c7d7 Apr 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.