Skip to content

Commit

Permalink
Merge pull request #188 from panoratech/annotate-docs-crmcontact
Browse files Browse the repository at this point in the history
📝 SDK & Connections docs
  • Loading branch information
rflihxyz authored Dec 21, 2023
2 parents c3902ac + f1543ff commit eefe299
Show file tree
Hide file tree
Showing 9 changed files with 169 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ build/**
dist/**
redis-data
redis_data
.env
.env
.DS_Store
4 changes: 4 additions & 0 deletions docs/backend-sdk/java.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'Java SDK'
description: 'Introduction to our Java SDK'
---
4 changes: 4 additions & 0 deletions docs/backend-sdk/python.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'Python SDK'
description: 'Introduction to our Python SDK'
---
54 changes: 54 additions & 0 deletions docs/backend-sdk/typescript.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: 'TypeScript SDK'
description: 'Introduction to our Typescript SDK'
---


# Installing & instantiating the Typescript SDK
Install it with your favorite package manager, e.g.:

```bash
npm i @panora/typescript-sdk
```

Instantiate the SDK:

```javascript
import { PanoraSDK } from '@panora/typescript-sdk';

const sdk = new PanoraSDK('YOUR_API_KEY');
```

<Tip>
Visit your dashboard to create an API Key
</Tip>

### List all connections to your app

```javascript
import { PanoraSDK } from '@panora/typescript-sdk';

const sdk = new PanoraSDK('process.env.PANORA_API_KEY');

(async () => {
const result = await sdk.connections.getConnections();
console.log(result);
})();
```

This will list all the connections available, across all users.
```json
{
"id_connection": "6cd057cb-39df-44ce-9be8-ax9d167c3940",
"status": "valid",
"provider_slug": "hubspot",
"account_url": null,
"token_type": "oauth",
"access_token": "904570287538dddf72fd821e4d5cec51:66266ee62310752d4a243c12b133656edd5af42947a832f4439c710334e045e59782107d40e856c27e813b7a6ed068100376b3ff83d1c8237330ba034605dd846650524e6fcfb708e3f62b1401d8a0dc3d90022cdf9ad1c76fc9209f3a5d153f6e33bbb8f6642600a6c9a098e81fb1e2da0fdff0455b7823519fba195b5065b4319a314013e22f934c80e4f60bec4385989c92c2dd9036d19f720e85b10325c42dc8a035c363e279af0e4ab2c4cd016051c5b32bf6009bf0df0aa8565d048856",
"refresh_token": "904570287538dddf72fd821e4d5cec51:58d9c1492b908caef83885b467d1ab1ea9fc6994a59ed4392edbb5365b89a02a8a4995347d8ec37037192a96856e2c24",
"expiration_timestamp": "2023-12-20T18:44:44.869Z",
"created_at": "2023-12-10T18:20:06.275Z",
"id_project": "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
"id_linked_user": "d7a0af02-0f9b-40a6-86a9-612dcfe341fe"
}
```
5 changes: 5 additions & 0 deletions docs/connections/api/list.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: 'List connections'
description: 'List all connections across all platforms using this endpoint'
openapi: "GET /connections"
---
76 changes: 76 additions & 0 deletions docs/connections/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: 'The connection object'
description: "Introduction to Panora's `connection` concept"
---

## The `connection` object represents an access right to a user's data


<RequestExample>
```json JSON
{
"id_connection": "6cd057cb-39df-44ce-9be8-ab9d167c3940",
"status": "valid",
"provider_slug": "hubspot",
"account_url": null,
"token_type": "oauth",
"access_token": "<oAuth access token>",
"refresh_token": "<oAuth refresh Token>",
"expiration_timestamp": "2023-12-20T18:44:44.869Z",
"created_at": "2023-12-10T18:20:06.275Z",
"id_project": "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
"id_linked_user": "d7a0af02-0f9b-40a6-86a9-612dcfe341fe"
}
```
</RequestExample>


<ResponseField name="connection" type="Connection Object">
<Expandable title="properties" defaultOpen="true">

<ResponseField name="id_connection" type="uuid">
Panora Defined UUID for this connection
</ResponseField>

<ResponseField name="status" type="string" required>
The status of the `connection`. Can be `active`, or `expired`
</ResponseField>

<ResponseField name="provider_slug" type="string" required>
The provider slug for this `connection`
</ResponseField>

<ResponseField name="account_url" type="string">
The account URL for this `connection`. Optionnal.
</ResponseField>

<ResponseField name="token_type" type="string" required>
The token type for this `connection`
</ResponseField>

<ResponseField name="access_token" type="string" required>
The access token for this `connection`
</ResponseField>

<ResponseField name="refresh_token" type="string" required>
The refresh token for this `connection`
</ResponseField>

<ResponseField name="expiration_timestamp" type="string" required>
The expiration timestamp for this `connection`
</ResponseField>

<ResponseField name="created_at" type="string" required>
The creation timestamp for this `connection`
</ResponseField>

<ResponseField name="id_project" type="uuid" required>
The project UUID this `connection` belongs to.
</ResponseField>

<ResponseField name="id_linked_user" type="uuid" required>
The linked user UUID this `connection` belongs to.
</ResponseField>

</Expandable>
</ResponseField>
2 changes: 1 addition & 1 deletion docs/crm/contacts/api/get.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'Retrieve a contact'
description: 'Retrieve a contact from connected CRMs'
description: 'Retrieve a contact by id from connected CRMs'
openapi: "GET /crm/contact/{id}"
---
2 changes: 1 addition & 1 deletion docs/crm/contacts/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: 'The Contact Object'
description: 'Introduction to our CRM `contact` Unified Model'

---
## The Unified `contact` Object
The `contact` object is used to represent an existing point of contact at a company in a CRM system.
Expand Down Expand Up @@ -44,6 +43,7 @@ The `contact` object is used to represent an existing point of contact at a comp

<ResponseField name="contact" type="Contact Object">
<Expandable title="properties" defaultOpen="true">

<ResponseField name="id_contact" type="uuid">
Panora Defined UUID for this contact
</ResponseField>
Expand Down
22 changes: 22 additions & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
"url": "https://github.com/panoratech/Panora"
},
"tabs": [

{
"name": "Connections",
"url": "connections"
},
{
"name": "CRM",
"url": "crm"
Expand Down Expand Up @@ -79,6 +84,14 @@
"quick-start"
]
},
{
"group": "Connections",
"pages": [
"connections/overview",
"connections/api/list"
]
}
,
{
"group": "CRM",
"pages": [
Expand Down Expand Up @@ -222,6 +235,15 @@
"features/custom-fields"
]
},
{
"group": "Backend SDKs",
"pages": [
"backend-sdk/typescript",
"backend-sdk/python",
"backend-sdk/java"
]
}
,
{
"group": "Support",
"pages": [
Expand Down

0 comments on commit eefe299

Please sign in to comment.