Changelog
v4.0.0
Breaking Changes
- Salable API versions are now supported and
Version
is now a required argument uponSalable
instantiation. (Currently supportsv2
)- Support for
v1
of the Salable API has been deprecated
- Support for
Licenses
getAll
now supports cursor based pagination, licenses can also be filtered bystatus
,subscriptionUuid
,planUuid
,productUuid
, andgranteeId
getOne
andgetForGranteeId
now offer anexpand
option to expand certain properties (e.g.plan
etc)getForPurchaser
no longer offerscancelLink
as an optiongetUsage
has been deprecatedcreate
andcreateMany
are now seperate methods,status
andendTime
have been added as optional parametersupdate
method parameters have been changed to have an object as the second parameter, thegranteeId
property is where the grantee ID value can be assignedcancelMany
method parameter has been updated to be an object, theuuids
property is where an array of license UUIDs to cancel can be assignedverifyLicenseCheck
has been renamed toverify
Plans
getOne
now offers anexpand
option to expand certain properties (e.g.product
etc)getCheckoutLink
options have now been updated:vat
is no longer supported and has been deprecatedcustomer
has been deprecated and been replaced withcustomerId
andcustomerEmail
contactUsLink
has been deprecatedmarketingConsent
has been deprecatedcouponCode
has been deprecatedcustomMessage
has been deprecatedautomaticTax
,changeQuantity
, andrequirePaymentMethod
have been added
Pricing Tables
getOne
options have been updated. The only supported options are nowgranteeId
andcurrency
Products
getOne
now offers anexpand
option to expand certain properties (e.g.plan
etc)getPricingTable
options have been updated. The only supported options are nowgranteeId
andcurrency
Subscriptions
getOne
now offers anexpand
option to expand certain properties (e.g.plan
etc)getAll
method added. Retrieves a list of all subscriptionsgetInvoices
method added. Retrieves a list of invoices for a subscriptiongetSwitchablePlans
method added. Retrieves a list of available plans that a subscribed user can switch togetUpdatePaymentLink
method added. Retrieves the update payment portal link for a specific subscriptiongetPortalLink
method added. Retrieves the customer portal link for a subscriptiongetCancelSubscriptionLink
method added. Retrieves the cancel subscription portal link for a specific subscriptiongetPaymentMethod
method added. Retrieves the payment method used to pay for a subscriptionreactivateSubscription
method added. Reactivate a Subscription's scheduled cancellation before the billing period has passedupdatePlan
method has been deprecatedaddSeats
andremoveSeats
now optionally allow proration as an option
Usage (NEW)
getAllUsageRecords
gets all usage records for grantee's metered licensesgetCurrentUsageRecord
gets current usage record for grantee on planupdateLicenseUsage
updates a license's usage
RBAC (DEPRECATED)
- All RBAC methods have been deprecated and currently not supported by the SDK
Other Changes
- DOCS: JSDoc and SDK documentation have been updated
- interfaces have been replaced with types
403
and404
errors now specifically handled
v3.2.0
Licenses
- Added
getOne
,getForPurchaser
,getForGranteeId
,getUsage
&getCount
licenses methods to SDK.
v3.1.0
Licenses
- Added
getOne
,getForPurchaser
,getForGranteeId
,getUsage
&getCount
licenses methods to SDK.
v3.0.0
Error handling
- Added new Error classes
SalableResponseError
,SalableValidationError
andSalableUnknownError
- New error codes
More information on error handling
v2.8.0
Subscriptions
- Added
changePlan
subscriptions method to SDK.
Pricing Tables
- Added
getOne
pricing tables method to SDK.
v2.7.0
Licenses
- Added
update
,updateMany
&getCount
licenses methods to SDK.
v2.6.0
Subscriptions
- Added
addSeats
&removeSeats
subscription methods to SDK.
v2.5.0
Features
- Added
Products
(getOne
,getCheckoutLink
,getFeatures
,getCapabilities
,getCurrencies
) methods to SDK.
v2.4.0
Features
- Added
plans
(getOne
,getCheckoutLink
,getFeatures
,getCapabilities
,getCurrencies
) methods to SDK.
Other Changes
- DOCS: Updated links to resources object documentation
v2.3.0
Features
- Added URL support in constructor for passing API URL
v2.2.0
Features
- Added
cancel
subscription method to SDK.
v2.1.0
Features
- Added
rbac
(permissions
,users
,roles
) methods to SDK.
Other Changes
- DOCS: Updated documentation mistakes and inaccuracies
v2.0.0
Breaking Changes
- Top level export
SalableApi
renamed toSalable
getLicenses()
renamed togetAll()
createLicense()
renamed tocreate()
checkLicenses()
renamed tocheck()
getSubscription()
renamaed togetOne()
changePlan()
renmaed toupdatePlan()
updateUsage()
renamed toupdate()
Other Changes
- DOCS: JSDoc documentation added to all methods for each class
- FEAT: Updated internal
_request
method to support TS Generics for return and argument types - CHORE: Restructured repository contents so endpoints aren't contained inside a
third-party-api
folder.