npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

makeimpact

v1.3.0

Published

Official JavaScript SDK for 1ClickImpact

Readme

🌱 MakeImpact

npm version License: MIT TypeScript

Official JavaScript SDK for 1ClickImpact - Easily integrate impact actions into your applications

📦 Installation

npm install makeimpact
# or
yarn add makeimpact
# or
pnpm add makeimpact

🚀 Getting Started

You'll need an API key to use this SDK. You can get your API key from the 1ClickImpact Account API Keys page.

import { OneClickImpact, Environment } from "makeimpact";

// Initialize the SDK with your API key (production environment by default)
const sdk = new OneClickImpact("your_api_key");

// Create environmental impact with just a few lines of code
await sdk.plantTree({ amount: 1 });
await sdk.cleanOcean({ amount: 5 });
await sdk.captureCarbon({ amount: 2 });

🌍 Environmental Impact Actions

🌳 Plant Trees

Help combat deforestation and climate change by planting trees.

// Plant a single tree
await sdk.plantTree({ amount: 1 });

// Plant trees with a specific category
await sdk.plantTree({ amount: 10, category: "food" });

// Plant trees with customer tracking
await sdk.plantTree({
  amount: 5,
  customerEmail: "[email protected]",
  customerName: "John Doe",
});

🌊 Clean Ocean Plastic

Remove plastic waste from our oceans to protect marine life.

// Clean 5 pounds of ocean plastic
await sdk.cleanOcean({ amount: 5 });

// Clean ocean plastic with customer tracking
await sdk.cleanOcean({
  amount: 10,
  customerEmail: "[email protected]",
  customerName: "John Doe",
});

♻️ Capture Carbon

Reduce greenhouse gas emissions by capturing carbon.

// Capture 2 pounds of carbon
await sdk.captureCarbon({ amount: 2 });

// Capture carbon with customer tracking
await sdk.captureCarbon({
  amount: 5,
  customerEmail: "[email protected]",
  customerName: "John Doe",
});

💰 Donate Money

Support any cause through direct monetary donations.

// Donate $1.00 (amount in cents)
await sdk.donateMoney({ amount: 100 });

// Donate with customer tracking
await sdk.donateMoney({
  amount: 500, // $5.00
  customerEmail: "[email protected]",
  customerName: "John Doe",
});

Note: To set up a custom cause for donations, please contact 1ClickImpact directly. All causes must be vetted and approved to ensure they meet their standards for transparency and impact.

📊 Data Access & Reporting

Get Records

Retrieve impact records with optional filtering.

// Get all records
const records = await sdk.getRecords();

// Filter records by type
const treeRecords = await sdk.getRecords({
  filterBy: "tree_planted",
});

// Filter records by date range
const recentRecords = await sdk.getRecords({
  startDate: "2023-01-01",
  endDate: "2023-12-31",
});

// Pagination
const paginatedRecords = await sdk.getRecords({
  cursor: "<cursor_from_previous_response>",
  limit: 10,
});

Get Customer Records

Retrieve records for specific customers.

// Get records for a specific customer
const customerRecords = await sdk.getCustomerRecords({
  customerEmail: "[email protected]",
});

// Filter customer records by type
const customerTreeRecords = await sdk.getCustomerRecords({
  customerEmail: "[email protected]",
  filterBy: "tree_planted",
});

Get Customers

Retrieve customer information.

// Get all customers (default limit is 10)
const customers = await sdk.getCustomers();

// Get customers with filtering and pagination
const filteredCustomers = await sdk.getCustomers({
  customerEmail: "[email protected]", // Optional: Filter by email
  limit: 50, // Optional: Limit results (1-1000)
  cursor: "<cursor_from_previous_response>", // Optional: For pagination
});

🔍 Track Impact

Track the complete lifecycle and current status of a specific impact. Get real-time tracking information including project location with maps, assigned agents, completion status, impact documentation, and live session details.

// Create an impact and track it
const plantResponse = await sdk.plantTree({ amount: 1 });

// Track the impact using the userID and timeUTC from the response
const trackingInfo = await sdk.track({
  userID: plantResponse.userID,
  timeUTC: plantResponse.timeUTC,
});

console.log(`Tracking ID: ${trackingInfo.trackingID}`);
console.log(`Impact Initiated: ${trackingInfo.impactInitiated}`);

// Check impact details
if (trackingInfo.treePlanted) {
  console.log(`Trees planted: ${trackingInfo.treePlanted}`);
}

// Check project information (when available)
if (trackingInfo.projectID) {
  console.log(`Project ID: ${trackingInfo.projectID}`);
}

if (trackingInfo.assignedAgent) {
  console.log(`Assigned Agent: ${trackingInfo.assignedAgent}`);
}

if (trackingInfo.projectLocation) {
  console.log(`Project Location: ${trackingInfo.projectLocation}`);
}

if (trackingInfo.locationMap) {
  console.log(`View Map: ${trackingInfo.locationMap}`);
}

// Check completion status
if (trackingInfo.impactCompleted) {
  console.log(`Impact Completed: ${trackingInfo.impactCompleted}`);
}

// Check for impact videos or live sessions
if (trackingInfo.impactVideo) {
  console.log(`Impact Video: ${trackingInfo.impactVideo}`);
}

if (trackingInfo.liveSessionDate) {
  console.log(`Live Session: ${trackingInfo.liveSessionDate}`);
}

You can also track impacts from historical records:

// Get records and track a specific impact
const records = await sdk.getRecords({ limit: 1 });
if (records.userRecords.length > 0) {
  const record = records.userRecords[0];
  const trackingInfo = await sdk.track({
    userID: record.userID,
    timeUTC: record.timeUTC,
  });
  console.log("Tracking Info:", trackingInfo);
}

Track Response Fields:

  • trackingID: Unique identifier for this impact (format: userID-timeUTC)
  • impactInitiated: UTC timestamp when the impact was created
  • treePlanted, wasteRemoved, carbonCaptured, moneyDonated: Impact metrics (optional)
  • category: Impact category (e.g., "food" for food-bearing trees)
  • donationAvailable: When the donation became available for the project
  • donationSent: When the donation was sent to the non-profit
  • assignedAgent: Name of the agent or organization executing the impact
  • projectLocation: Detailed description of project location and partners
  • locationMap: Google Maps embed URL for the project location
  • impactCompleted: When the impact was completed
  • donationCategory: Type of impact funded (for donations)
  • certificate: Certificate URL for the impact (only in production)
  • impactVideo: URL to video recording or live session
  • liveSessionDate: Scheduled live session timestamp
  • projectID: ID of the project assigned to this impact (when available)
  • isTestTransaction: Whether this was a test transaction
  • isBonusImpact: Whether this was a bonus impact from subscription plans

Get Projects

Retrieve available environmental impact projects.

// Get all projects
const projects = await sdk.getProjects();

// Filter by impact type
const treeProjects = await sdk.getProjects({ type: "trees" });
const oceanProjects = await sdk.getProjects({ type: "ocean" });
const carbonProjects = await sdk.getProjects({ type: "carbon" });

// Get projects in a specific language
const germanProjects = await sdk.getProjects({ locale: "de" });

projects.projects.forEach((project) => {
  console.log(`${project.projectID}: ${project.name} (${project.location})`);
});

Get Project by ID

Retrieve full details for a specific project.

const project = await sdk.getProjectById("PROJECT_ID");

console.log(`Name: ${project.name}`);
console.log(`Type: ${project.type}`);
console.log(`Location: ${project.location}`);
console.log(`Organization: ${project.organization}`);
console.log(`Available: ${project.available}`);

// SDG alignments
project.sdgs.forEach((sdg) => {
  console.log(`SDG ${sdg.number}: ${sdg.title}`);
});

// Get project in a specific language
const project_es = await sdk.getProjectById("PROJECT_ID", { locale: "es" });

Project Fields:

  • projectID: Unique project identifier
  • name: Project name
  • type: Impact type ("trees", "ocean", or "carbon")
  • location: Project location name
  • description: Short project description
  • about: Detailed project information
  • countryCode: ISO country code
  • organization: Executing organization name
  • sdgs: Array of UN Sustainable Development Goals this project aligns with
  • imageUrls: Array of project image URLs
  • latitude, longitude: Project coordinates
  • available: Whether the project is currently active

Get Impact

Get aggregated impact statistics with breakdown between your organization's direct impact and customer impact.

// Get overall impact statistics for your organization
const impact = await sdk.getImpact();

console.log(`Total trees planted: ${impact.treePlanted}`);
console.log(`Total ocean waste removed: ${impact.wasteRemoved} lbs`);
console.log(`Total carbon captured: ${impact.carbonCaptured} lbs`);
console.log(`Total money donated: $${impact.moneyDonated / 100}`);

// View breakdown by impact source
console.log("\nYour organization's direct impact:");
console.log(`Trees: ${impact.userImpact.treePlanted}`);
console.log(`Ocean waste: ${impact.userImpact.wasteRemoved} lbs`);
console.log(`Carbon: ${impact.userImpact.carbonCaptured} lbs`);
console.log(`Donations: $${impact.userImpact.moneyDonated / 100}`);

console.log("\nCustomer impact:");
console.log(`Trees: ${impact.customerImpact.treePlanted}`);
console.log(`Ocean waste: ${impact.customerImpact.wasteRemoved} lbs`);
console.log(`Carbon: ${impact.customerImpact.carbonCaptured} lbs`);
console.log(`Donations: $${impact.customerImpact.moneyDonated / 100}`);

Get Daily Impact

Retrieve a time-series of your daily impact data to track progress and analyze patterns over time.

// Get all daily impact data
const dailyImpact = await sdk.getDailyImpact();

console.log(`User ID: ${dailyImpact.userID}`);
console.log(`Total days with impact: ${dailyImpact.dailyImpact.length}`);

// Display daily impact records
dailyImpact.dailyImpact.forEach((record) => {
  console.log(`\nDate: ${record.date}`);
  console.log(`Trees planted: ${record.treePlanted}`);
  console.log(`Ocean waste removed: ${record.wasteRemoved} lbs`);
  console.log(`Carbon captured: ${record.carbonCaptured} lbs`);
  console.log(`Money donated: $${record.moneyDonated / 100}`);
});

// Filter by date range
const filteredImpact = await sdk.getDailyImpact({
  startDate: "2025-01-01",
  endDate: "2025-12-31",
});

Who Am I

Verify your API key and get account information.

// Verify API key and get account information
const accountInfo = await sdk.whoAmI();

⚙️ Configuration

Environments

The SDK supports two environments:

  • Production (default): Uses the live API at https://api.1clickimpact.com
  • Sandbox: Uses the testing API at https://sandbox.1clickimpact.com

To use the sandbox environment for testing:

import { OneClickImpact, Environment } from "makeimpact";

// Initialize with sandbox environment
const sdk = new OneClickImpact("your_test_api_key", Environment.SANDBOX);

🔗 Additional Resources

📄 License

MIT