Package Exports
- @villagehq/extension-sdk
- @villagehq/extension-sdk/dist/index.js
- @villagehq/extension-sdk/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@villagehq/extension-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Village Extension SDK
This SDK allows partners to integrate Village's relationship intelligence features into their own Chrome extensions.
Installation
npm install @villagehq/extension-sdk
Usage
The SDK provides two main functions:
initServiceWorker
- Initializes the Village functionality in your extension's service workerinitContentScript
- Initializes the Village functionality in your extension's content script
Service Worker Integration
In your extension's service worker file:
import Village from "@villagehq/extension-sdk";
// Initialize Village service worker
Village.initServiceWorker();
// You can add your own extension functionality here
Content Script Integration
In your extension's content script file:
import Village from "@villagehq/extension-sdk";
// Initialize Village content script
Village.initContentScript();
// You can add your own extension functionality here
Required Permissions
Your extension's manifest.json must include the following permissions:
{
"permissions": [
"cookies",
"storage",
"webRequest",
"alarms",
"webNavigation"
],
"host_permissions": ["*://*.linkedin.com/*", "*://*.village.do/*"]
}
Example Extension
Here's a complete example of how to set up a basic extension with Village integration:
manifest.json
{
"manifest_version": 3,
"name": "My Extension with Village",
"version": "1.0.0",
"description": "My extension with Village integration",
"permissions": ["cookies", "storage", "webRequest", "alarms"],
"host_permissions": ["*://*.linkedin.com/*", "*://*.village.do/*"],
"background": {
"service_worker": "service-worker.js",
"type": "module"
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["content-script.js"]
}
]
}
service-worker.js
import Village from "@villagehq/extension-sdk";
// Initialize Village service worker
Village.initServiceWorker();
content-script.js
import Village from "@villagehq/extension-sdk";
// Initialize Village content script
Village.initContentScript();
Support
For any questions or issues, please contact Village support at support@village.do.
Features
- LinkedIn integration
- Relationship intelligence
- Connection path discovery
- Village API integration
Documentation
For full documentation, visit docs.village.do.
License
Proprietary. This code is the exclusive property of Village. Use of this SDK is restricted to Village partners with valid contracts only.