Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@panora/typescript-sdk
Advanced tools
The Typescript SDK for PanoraSDK.
The Panora API description
npm i @panora/typescript-sdk
To see whether an endpoint needs a specific type of authentication check the endpoint's documentation.
The PanoraSDK API uses access tokens as a form of authentication. You can set the access token when initializing the SDK through the constructor:
const sdk = new PanoraSDK('YOUR_ACCESS_TOKEN')
Or through the setAccessToken
method:
const sdk = new PanoraSDK()
sdk.setAccessToken('YOUR_ACCESS_TOKEN')
You can also set it for each service individually:
const sdk = new PanoraSDK()
sdk.main.setAccessToken('YOUR_ACCESS_TOKEN')
Here is a simple program demonstrating usage of this SDK. It can also be found in the examples/src/index.ts
file in this directory.
When running the sample make sure to use npm install
to install all the dependencies.
import { PanoraSDK } from '@panora/typescript-sdk';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.main
.appControllerGetHello();
console.log(result);
})();
A list of all services and services methods.
Services
Method | Description |
---|---|
appControllerGetHello |
Method | Description |
---|---|
signUp | Register |
signIn | Log In |
getUsers | Get users |
getApiKeys | Retrieve API Keys |
generateApiKey | Create API Key |
Method | Description |
---|---|
handleOAuthCallback | Capture oAuth Callback |
getConnections | Retrieve Connections |
Method | Description |
---|---|
createWebhookMetadata | Add webhook metadata |
getWebhooksMetadata | Retrieve webhooks metadata |
updateWebhookStatus | Update webhook status |
Method | Description |
---|---|
addLinkedUser | Add Linked User |
getLinkedUsers | Retrieve Linked Users |
getLinkedUser | Retrieve a Linked User |
Method | Description |
---|---|
getOrganisations | Retrieve Organisations |
createOrganisation | Create an Organisation |
Method | Description |
---|---|
getProjects | Retrieve projects |
createProject | Create a project |
Method | Description |
---|---|
getFieldMappingsEntities | Retrieve field mapping entities |
getFieldMappings | Retrieve field mappings |
getFieldMappingValues | Retrieve field mappings values |
defineTargetField | Define target Field |
mapField | Map Custom Field |
getCustomProviderProperties | Retrieve Custom Properties |
Method | Description |
---|---|
getEvents | Retrieve Events |
Method | Description |
---|---|
createMagicLink | Create a Magic Link |
getMagicLinks | Retrieve Magic Links |
getMagicLink | Retrieve a Magic Link |
Method | Description |
---|---|
passthroughRequest | Make a passthrough request |
Method | Description |
---|---|
addContact | Create CRM Contact |
getContacts | Retrieve a batch of CRM Contacts |
updateContact | Update a CRM Contact |
getContact | Retrieve a CRM Contact |
addContacts | Add a batch of CRM Contacts |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.main.appControllerGetHello();
console.log(result);
})();
Register
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = {
email: 'email',
first_name: 'first_name',
last_name: 'last_name',
password_hash: 'password_hash',
};
const result = await sdk.auth.signUp(input);
console.log(result);
})();
Log In
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = { email: 'email', id_user: 'id_user', password_hash: 'password_hash' };
const result = await sdk.auth.signIn(input);
console.log(result);
})();
Get users
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.auth.getUsers();
console.log(result);
})();
Retrieve API Keys
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.auth.getApiKeys();
console.log(result);
})();
Create API Key
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = { keyName: 'keyName', projectId: 'projectId', userId: 'userId' };
const result = await sdk.auth.generateApiKey(input);
console.log(result);
})();
Capture oAuth Callback
Required Parameters
Name | Type | Description |
---|---|---|
state | string | |
code | string | |
location | string |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.connections.handleOauthCallback('state', 'code', 'location');
console.log(result);
})();
Retrieve Connections
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.connections.getConnections();
console.log(result);
})();
Add webhook metadata
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = {
description: 'description',
id_project: 'id_project',
scope: 'scope',
url: 'url',
};
const result = await sdk.webhook.createWebhookMetadata(input);
console.log(result);
})();
Retrieve webhooks metadata
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.webhook.getWebhooksMetadata();
console.log(result);
})();
Update webhook status
Required Parameters
Name | Type | Description |
---|---|---|
id | string |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.webhook.updateWebhookStatus('id');
console.log(result);
})();
Add Linked User
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = {
alias: 'alias',
id_project: 'id_project',
linked_user_origin_id: 'linked_user_origin_id',
};
const result = await sdk.linkedUsers.addLinkedUser(input);
console.log(result);
})();
Retrieve Linked Users
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.linkedUsers.getLinkedUsers();
console.log(result);
})();
Retrieve a Linked User
Required Parameters
Name | Type | Description |
---|---|---|
id | string |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.linkedUsers.getLinkedUser('id');
console.log(result);
})();
Retrieve Organisations
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.organisations.getOrganisations();
console.log(result);
})();
Create an Organisation
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = { name: 'name', stripe_customer_id: 'stripe_customer_id' };
const result = await sdk.organisations.createOrganisation(input);
console.log(result);
})();
Retrieve projects
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.projects.getProjects();
console.log(result);
})();
Create a project
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = { id_organization: 'id_organization', name: 'name' };
const result = await sdk.projects.createProject(input);
console.log(result);
})();
Retrieve field mapping entities
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.fieldMapping.getFieldMappingsEntities();
console.log(result);
})();
Retrieve field mappings
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.fieldMapping.getFieldMappings();
console.log(result);
})();
Retrieve field mappings values
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.fieldMapping.getFieldMappingValues();
console.log(result);
})();
Define target Field
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = {
data_type: 'data_type',
description: 'description',
name: 'name',
object_type_owner: 'object_type_owner',
};
const result = await sdk.fieldMapping.defineTargetField(input);
console.log(result);
})();
Map Custom Field
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = {
attributeId: 'attributeId',
linked_user_id: 'linked_user_id',
source_custom_field_id: 'source_custom_field_id',
source_provider: 'source_provider',
};
const result = await sdk.fieldMapping.mapField(input);
console.log(result);
})();
Retrieve Custom Properties
Required Parameters
Name | Type | Description |
---|---|---|
linkedUserId | string | |
providerId | string |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.fieldMapping.getCustomProviderProperties('linkedUserId', 'providerId');
console.log(result);
})();
Retrieve Events
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.events.getEvents();
console.log(result);
})();
Create a Magic Link
Required Parameters
| input | object | Request body. |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = {
alias: 'alias',
email: 'email',
id_project: 'id_project',
linked_user_origin_id: 'linked_user_origin_id',
};
const result = await sdk.magicLink.createMagicLink(input);
console.log(result);
})();
Retrieve Magic Links
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.magicLink.getMagicLinks();
console.log(result);
})();
Retrieve a Magic Link
Required Parameters
Name | Type | Description |
---|---|---|
id | string |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.magicLink.getMagicLink('id');
console.log(result);
})();
Make a passthrough request
Required Parameters
Name | Type | Description |
---|---|---|
integrationId | string | |
linkedUserId | string | |
input | object | Request body. |
Return Type
PassThroughResponse
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = { data: {}, headers_: {}, method: 'GET', path: 'path' };
const result = await sdk.passthrough.passthroughRequest(input, 'integrationId', 'linkedUserId');
console.log(result);
})();
Create CRM Contact
Required Parameters
Name | Type | Description |
---|---|---|
integrationId | string | |
linkedUserId | string | |
input | object | Request body. |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|---|---|
remoteData | boolean |
Return Type
AddContactResponse
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = {
email_addresses: [],
field_mappings: {},
first_name: 'first_name',
last_name: 'last_name',
phone_numbers: [],
};
const result = await sdk.crmContact.addContact(input, 'integrationId', 'linkedUserId', {
remoteData: true,
});
console.log(result);
})();
Retrieve a batch of CRM Contacts
Required Parameters
Name | Type | Description |
---|---|---|
integrationId | string | |
linkedUserId | string |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|---|---|
remoteData | boolean |
Return Type
GetContactsResponse
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.crmContact.getContacts('integrationId', 'linkedUserId', {
remoteData: true,
});
console.log(result);
})();
Update a CRM Contact
Required Parameters
Name | Type | Description |
---|---|---|
id | string |
Return Type
Returns a dict object.
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.crmContact.updateContact('id');
console.log(result);
})();
Retrieve a CRM Contact
Required Parameters
Name | Type | Description |
---|---|---|
id | string |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|---|---|
remoteData | boolean |
Return Type
GetContactResponse
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const result = await sdk.crmContact.getContact('id', { remoteData: true });
console.log(result);
})();
Add a batch of CRM Contacts
Required Parameters
Name | Type | Description |
---|---|---|
integrationId | string | |
linkedUserId | string | |
input | object | Request body. |
Optional Parameters
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
Name | Type | Description |
---|---|---|
remoteData | boolean |
Return Type
AddContactsResponse
Example Usage Code Snippet
import { PanoraSDK } from './src';
const sdk = new PanoraSDK({ accessToken: process.env.PANORASDK_ACCESS_TOKEN });
(async () => {
const input = [{}, {}];
const result = await sdk.crmContact.addContacts(input, 'integrationId', 'linkedUserId', {
remoteData: true,
});
console.log(result);
})();
License: MIT. See license in LICENSE.
FAQs
PanoraSDK - The Panora API description
We found that @panora/typescript-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.