lightspeed-retail-sdk 3.3.2 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
A modern JavaScript SDK for interacting with the Lightspeed Retail API. This SDK provides a convenient, secure, and flexible way to access Lightspeed Retail's features—including customer, item, and order management.
|
|
4
4
|
|
|
5
|
-
**Current Version: 3.3.
|
|
5
|
+
**Current Version: 3.3.3** — increase token buffer time from 1 minute to 5 minutes for improved token management
|
|
6
6
|
|
|
7
|
-
## **🆕 Recent Updates (v3.3.
|
|
7
|
+
## **🆕 Recent Updates (v3.3.3)**
|
|
8
8
|
|
|
9
9
|
- **Add centralized query param builder for API requests**: Add centralized query param builder for API requests. Supports input as object, string, or array, and manages relations/load_relations. Ensures no double-encoding of parameters and handles special cases for 'or' and 'timeStamp'.
|
|
10
10
|
- **🎯 Enhanced Parameter Support**: All main getter methods now support both legacy and new object-based parameters with full backward compatibility
|
|
@@ -66,7 +66,7 @@ const items = await sdk.getItems({
|
|
|
66
66
|
## Table of Contents
|
|
67
67
|
|
|
68
68
|
- [Another Unofficial Lightspeed Retail V3 API SDK](#another-unofficial-lightspeed-retail-v3-api-sdk)
|
|
69
|
-
- [**🆕 Recent Updates (v3.3.
|
|
69
|
+
- [**🆕 Recent Updates (v3.3.3)**](#-recent-updates-v333)
|
|
70
70
|
- [🚀 Key Features](#-key-features)
|
|
71
71
|
- [🔄 Migrating from 3.1.x](#-migrating-from-31x)
|
|
72
72
|
- [Backward Compatibility](#backward-compatibility)
|
|
@@ -207,7 +207,7 @@ class LightspeedSDKCore {
|
|
|
207
207
|
// Token management
|
|
208
208
|
async getToken() {
|
|
209
209
|
const now = new Date();
|
|
210
|
-
const bufferTime =
|
|
210
|
+
const bufferTime = 5 * 60 * 1000; // 5 minute buffer
|
|
211
211
|
const storedTokens = await this.tokenStorage.getTokens();
|
|
212
212
|
if (storedTokens.access_token && storedTokens.expires_at) {
|
|
213
213
|
const expiryTime = new Date(storedTokens.expires_at);
|
|
@@ -216,7 +216,7 @@ export class LightspeedSDKCore {
|
|
|
216
216
|
// Token management
|
|
217
217
|
async getToken() {
|
|
218
218
|
const now = new Date();
|
|
219
|
-
const bufferTime =
|
|
219
|
+
const bufferTime = 5 * 60 * 1000; // 5 minute buffer
|
|
220
220
|
|
|
221
221
|
const storedTokens = await this.tokenStorage.getTokens();
|
|
222
222
|
|