-
Notifications
You must be signed in to change notification settings - Fork 196
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
📝 Docs update #456
📝 Docs update #456
Changes from 2 commits
162121e
b7ff242
7d65840
d879f11
1f611db
dddb15d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -2,4 +2,69 @@ | |||||||||||||
title: "Frontend Widget" | ||||||||||||||
description: "" | ||||||||||||||
icon: "square-terminal" | ||||||||||||||
--- | ||||||||||||||
--- | ||||||||||||||
|
||||||||||||||
**insert**video | ||||||||||||||
|
||||||||||||||
# Step 1: Import the code snippet | ||||||||||||||
|
||||||||||||||
<CodeGroup> | ||||||||||||||
```shell React | ||||||||||||||
npm i @panora/embedded-card-react | ||||||||||||||
``` | ||||||||||||||
</CodeGroup> | ||||||||||||||
|
||||||||||||||
<Note> | ||||||||||||||
By default, all connectors are rendered but you have the option to use the | ||||||||||||||
`category` prop to filter them by category. Learn more about values accepted | ||||||||||||||
[here](/glossary/metadata/category). | ||||||||||||||
</Note> | ||||||||||||||
|
||||||||||||||
#### Import a single connector card | ||||||||||||||
|
||||||||||||||
<CodeGroup> | ||||||||||||||
```javascript React | ||||||||||||||
import "@panora/embedded-card-react/dist/index.css"; | ||||||||||||||
import PanoraProviderCard from "@panora/embedded-card-react"; | ||||||||||||||
|
||||||||||||||
const MyPage = () => { | ||||||||||||||
return ( | ||||||||||||||
<PanoraProviderCard | ||||||||||||||
name={"hubspot"} # name of the provider | ||||||||||||||
category={"crm"} # vertical where provider belongs to | ||||||||||||||
projectId={"c9a1b1f8-466d-442d-a95e-11cdd00baf49"} # the project id tied to your organization | ||||||||||||||
returnUrl={"https://acme.inc"} # the url you want to redirect users to after the connection flow is successful | ||||||||||||||
linkedUserId={"b860d6c1-28f9-485c-86cd-fb09e60f10a2"} # the linked id of the user if already created in Panora system or user's info in your system | ||||||||||||||
/> | ||||||||||||||
) | ||||||||||||||
} | ||||||||||||||
``` | ||||||||||||||
</CodeGroup> | ||||||||||||||
#### Import the whole connector catalog | ||||||||||||||
<CodeGroup> | ||||||||||||||
```javascript React | ||||||||||||||
import "@panora/embedded-card-react/dist/index.css"; | ||||||||||||||
import PanoraDynamicCatalog from "@panora/embedded-card-react"; | ||||||||||||||
|
||||||||||||||
const MyPage = () => { | ||||||||||||||
return ( | ||||||||||||||
<PanoraDynamicCatalog | ||||||||||||||
category={"crm"} # optional but if provided it returns only connectors of the category | ||||||||||||||
projectId={"c9a1b1f8-466d-442d-a95e-11cdd00baf49"} # the project id tied to your organization | ||||||||||||||
returnUrl={"https://acme.inc"} # the url you want to redirect users to after the connection flow is successful | ||||||||||||||
linkedUserId={"b860d6c1-28f9-485c-86cd-fb09e60f10a2"} # the linked id of the user if already created in Panora system or user's info in your system | ||||||||||||||
/> | ||||||||||||||
) | ||||||||||||||
} | ||||||||||||||
``` | ||||||||||||||
</CodeGroup> | ||||||||||||||
|
||||||||||||||
Congrats ! You should be able to see the displayed connectors ! | ||||||||||||||
|
||||||||||||||
# Step 2 (optional): Select your own connectors | ||||||||||||||
|
||||||||||||||
**insert**video | ||||||||||||||
|
||||||||||||||
Comment on lines
+66
to
+68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Simplify the phrase for clarity. - You have the ability to choose which connectors will be rendered
+ You can choose which connectors to render Committable suggestion
Suggested change
|
||||||||||||||
You have the ability to choose which connectors will be rendered (also applied to magic-link). | ||||||||||||||
|
||||||||||||||
Go to _Manage Catalog Widget_ [section](https://dashboard.panora.dev/configuration), locate the connector you wish to add/remove and switch it on/off. |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,4 +2,79 @@ | |||||
title: "Import Your Existing Users" | ||||||
description: "" | ||||||
icon: "users" | ||||||
--- | ||||||
--- | ||||||
|
||||||
## Using the UI | ||||||
|
||||||
#### You can add a single linked user | ||||||
|
||||||
<Frame type="glass"> | ||||||
<video | ||||||
controls | ||||||
className="w-full aspect-video" | ||||||
src="/images/linkedusers.mp4" | ||||||
></video> | ||||||
</Frame> | ||||||
|
||||||
#### You can add a batch of linked users by using the drag n drop tool | ||||||
|
||||||
<Frame type="glass"> | ||||||
<video | ||||||
controls | ||||||
className="w-full aspect-video" | ||||||
src="/images/linkedusers.mp4" | ||||||
></video> | ||||||
</Frame> | ||||||
|
||||||
## Using our API | ||||||
|
||||||
This code adds a single/batch of linked accounts inside Panora. It helps us have an exact mapping of your existing users insdie our system. | ||||||
|
||||||
<CodeGroup> | ||||||
```shell Import a single existing user | ||||||
curl --request POST \ | ||||||
--url https://api.panora.dev/linked-users \ | ||||||
--header 'Authorization: Bearer <MY_API_KEY>' \ | ||||||
--header 'Content-Type: application/json' \ | ||||||
--data '{ | ||||||
"linked_user_origin_id": "acme_user_1", # your remote id (id representing your existing user inside your system) | ||||||
"alias": "acme", # your company name | ||||||
"id_project": "ikloqqkq90-djsddhjs-prs12dj", | ||||||
}' | ||||||
``` | ||||||
```shell Import a batch of existing users | ||||||
curl --request POST \ | ||||||
--url https://api.panora.dev/linked-users/batch \ | ||||||
--header 'Authorization: Bearer <MY_API_KEY>' \ | ||||||
--header 'Content-Type: application/json' \ | ||||||
--data '{ | ||||||
"linked_user_origin_ids": ["acme_user_1", "acme_user_2", "acme_user_3"], # array of remote ids (ids representing your existing users inside your system) | ||||||
"alias": "acme", # your company name | ||||||
"id_project": "ikloqqkq90-djsddhjs-prs12dj", | ||||||
}' | ||||||
``` | ||||||
</CodeGroup> | ||||||
|
||||||
# How to fetch linked users | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding a comma for better readability. - You must know how to fetch linked users as you'll have to use them in the UI widget prop.
+ You must know how to fetch linked users, as you'll have to use them in the UI widget prop. Committable suggestion
Suggested change
|
||||||
You must know how to fetch linked users as you'll have to use them in the UI widget prop. | ||||||
|
||||||
## Fetch using our library functions | ||||||
|
||||||
At any point in your code, if you have successfully added your linked users (see above) you'll be able to fetch them by calling : | ||||||
|
||||||
- `linkedUserFromRemoteId(remote_id: string)` where `remote_id` is the id of the user inside your system and this function returns a [LinkedUser object](/glossary/linked-account-object). | ||||||
- `fetchLinkedUsers()` where this function returns an array of [LinkedUser objects](/glossary/linked-account-object) for your projectId. | ||||||
|
||||||
<CodeGroup> | ||||||
```shell linkedUserFromRemoteId | ||||||
curl --request GET \ | ||||||
--url https://api.panora.dev/linked-users/fromRemoteId?remoteId=acme_id_1 \ | ||||||
--header 'Authorization: Bearer <MY_API_KEY>' \ | ||||||
``` | ||||||
```shell fetchLinkedUsers | ||||||
curl --request GET \ | ||||||
--url https://api.panora.dev/linked-users \ | ||||||
--header 'Authorization: Bearer <MY_API_KEY>' \ | ||||||
``` | ||||||
</CodeGroup> |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct the grammatical error in the introduction to the section on creating a custom field mapping.
Committable suggestion