@kanvas/core v0.1.6
Kanvas Core JS
Introduction
Welcome to the documentation for the Kanvas SDK, a TypeScript SDK designed exclusively to seamlessly connect with the Kanvas Niche ecosystem. This SDK is crafted to enhance the development of headless applications by providing easy-to-use interfaces for interacting with various modules within the Kanvas Niche ecosystem.
Table of Contents
Getting Started
Installation
To begin using the Kanvas SDK in your project, follow these simple steps:
npm install @kanvas/core
Initializate the sdk
Before using any module, you need to authenticate your application with the Kanvas Niche ecosystem. Obtain your API keys from the Kanvas Niche dashboard and initialize the SDK with the following code:
import KanvasCore, { genericAuthMiddleware } from '@kanvas/core';
// Function to retrieve the authentication token from cookies
const getKey = async (): Promise<string | null> => {
return localStorage.getItem("token") || null // wherever you have saved the user token
};
// Initialize Kanvas Core
const client= new KanvasCore({
url: 'kanvas-url',
key: 'your-kanvas-api-key',
middlewares: [genericAuthMiddleware(getKey)]
});
Modules
The Kanvas Niche SDK provides specific modules for common problems encountered during headless app development. Here are the key modules:
Ecosystem
The Ecosystem module handles authentication, teams, and company-related functionalities.
Inventory
The Inventory module manages products, variants, and distribution channels.
Social
The Social module deals with follows, comments, reactions, and messaging features.
CRM
The CRM module covers leads, deals, and pipelines for customer relationship management.
Usage Examples
Here are some basic examples demonstrating how to use the Kanvas Niche SDK:
Ecosystem - User Login
const user = await client.auth.login(email, password);
console.log(user);
Inventory
const products = await client.inventory.getProduct();
console.log(products);
CRM - Leads
const leads = await client.lead.getAllLeads();
console.log(leads);
API Reference
For a comprehensive list of available methods and their descriptions, refer to the API Reference.
Contribution Guidelines
If you'd like to contribute to the Kanvas Niche SDK, please follow our Contribution Guidelines. TBD
Contact and Support
If you have any questions, feedback, or issues, feel free to reach out to our team at the TBD
Happy coding with Kanvas!
6 days ago
6 days ago
5 days ago
5 days ago
7 days ago
8 days ago
8 days ago
9 days ago
12 days ago
12 days ago
13 days ago
13 days ago
13 days ago
14 days ago
15 days ago
19 days ago
19 days ago
19 days ago
21 days ago
28 days ago
29 days ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
6 months ago
6 months ago
6 months ago
10 months ago
10 months ago
9 months ago
9 months ago
9 months ago
9 months ago
6 months ago
6 months ago
6 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
11 months ago
7 months ago
10 months ago
6 months ago
10 months ago
7 months ago
7 months ago
7 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago