0.0.11 • Published 2 years ago

@heybrostudio/lemonsqueezy.js v0.0.11

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

The Lemon Squeezy JavaScript/TypeScript SDK

NPM Version License Static Badge APIs Count

Dear developers,

I am pleased to announce that my personal repository has been successfully merged into the official repository! This is a very exciting and important milestone.

As a result, my personal repository will be archived. This means that I will no longer maintain or update this repository, and all future development work will transition to the official repository.

Furthermore, with the archival of the repository, the associated npm packages will also be archived. This means that no new versions will be released in the future, and existing versions will continue to be available but will not receive feature updates or bug fixes.

I want to express my gratitude for your continued interest and support of my personal repository. I especially want to thank those who have actively contributed code, submitted issues, and provided suggestions. Without your support, the success of this repository would not have been possible.

Please note that new code and issue tracking will now take place in the official repository. I encourage you to redirect your focus and contribution efforts to the official repository to advance the project's development with a wider developer community.

If you have any questions or concerns, please feel free to reach out to me. Thank you for your interest and support in my repository.

Thank you once again!

Best regards, Caven Ding.

Additional information, please refer to the official repository: https://github.com/lmsqueezy/lemonsqueezy.js

Introduction

This is the unofficial JavaScript/TypeScript SDK for Lemon Squeezy.

Please read the API introduction page to understand how the API works.

Features

Installation

# bun
bun install @heybrostudio/lemonsqueezy.js
# pnpm
pnpm install @heybrostudio/lemonsqueezy.js
# npm
npm install @heybrostudio/lemonsqueezy.js

Usage

import { lemonSqueezySetup, getAuthenticatedUser } from '@heybrostudio/lemonsqueezy.js'

lemonSqueezySetup({ apiKey: 'Your Lemon Squeezy API Key.' })

const { data, error, statusCode } = await getAuthenticatedUser()

console.log(statusCode) // 200
console.log(error) // null
console.log(data)
/*
{
  meta: {
    test_mode: true,
  },
  jsonapi: {
    version: '1.0',
  },
  links: {
    self: 'https://api.lemonsqueezy.com/v1/users/1',
  },
  data: {
    type: 'users',
    id: '1',
    attributes: {
      name: 'Darlene Daugherty',
      email: 'gernser@yahoo.com',
      color: '#898FA9',
      avatar_url: 'https://www.gravatar.com/avatar/1ace5b3965c59dbcd1db79d85da75048?d=blank',
      has_custom_avatar: false,
      createdAt: '2021-05-24T14:08:31.000000Z',
      updatedAt: '2021-08-26T13:24:54.000000Z',
    },
    links: {
      self: 'https://api.lemonsqueezy.com/v1/users/1',
    },
  },
}
*/

For more functions usage, see Wiki.

Bundle size

exportmin+brotli
createDiscount870 B
createCheckout825 B
listLicenseKeyInstances772 B
listVariants770 B
listStores769 B
listPrices767 B
listSubscriptionInvoices767 B
listOrderItems766 B
listDiscounts765 B
listLicenseKeys765 B
updateSubscription765 B
listCheckouts764 B
listUsageRecords764 B
listDiscountRedemptions761 B
listSubscriptionItems760 B
listWebhooks759 B
listFiles755 B
listOrders755 B
listProducts755 B
listSubscriptions754 B
listCustomers753 B
createWebhook748 B
updateLicenseKey740 B
updateWebhook732 B
deactivateLicense702 B
activateLicense701 B
validateLicense699 B
getLicenseKeyInstance650 B
getDiscountRedemption646 B
getSubscriptionInvoice641 B
getUsageRecord638 B
getWebhook638 B
getLicenseKey637 B
getOrderItem637 B
getCheckout635 B
getDiscount634 B
getFile634 B
getOrder634 B
getPrice634 B
getProduct634 B
getVariant634 B
getCustomer632 B
getStore632 B
getSubscription631 B
updateSubscriptionItem626 B
archiveCustomer617 B
createCustomer614 B
getSubscriptionItemCurrentUsage614 B
createUsageRecord611 B
updateCustomer610 B
deleteWebhook591 B
getSubscriptionItem589 B
cancelSubscription585 B
deleteDiscount584 B
getAuthenticatedUser527 B
lemonSqueezySetup100 B

Contributing

See the Contributing Guide

Thanks

This project is heavily inspired by the following awesome projects.

License

MIT License © 2024-PRESENT Caven Ding

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago