lightspeed-retail-sdk 3.3.1 → 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.1** — Refactor: extract endpoints for maintainability and improve endpoint testing. Enhanced query param encoding and pagination logic for consistency.
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.1)**
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.1)**](#-recent-updates-v331)
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 = 1 * 60 * 1000; // 1 minute buffer
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);
@@ -277,7 +277,6 @@ class LightspeedSDKCore {
277
277
  }
278
278
  delete options.params; // Don't let axios try to re-encode
279
279
  }
280
- console.log("[LightspeedSDK] Final request URL:", options.url);
281
280
  try {
282
281
  const res = await (0, _axios.default)(options);
283
282
  this.lastResponse = res;
@@ -216,7 +216,7 @@ export class LightspeedSDKCore {
216
216
  // Token management
217
217
  async getToken() {
218
218
  const now = new Date();
219
- const bufferTime = 1 * 60 * 1000; // 1 minute buffer
219
+ const bufferTime = 5 * 60 * 1000; // 5 minute buffer
220
220
 
221
221
  const storedTokens = await this.tokenStorage.getTokens();
222
222
 
@@ -303,8 +303,6 @@ export class LightspeedSDKCore {
303
303
  delete options.params; // Don't let axios try to re-encode
304
304
  }
305
305
 
306
- console.log("[LightspeedSDK] Final request URL:", options.url);
307
-
308
306
  try {
309
307
  const res = await axios(options);
310
308
  this.lastResponse = res;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lightspeed-retail-sdk",
3
- "version": "3.3.1",
3
+ "version": "3.3.3",
4
4
  "description": "Another unofficial Lightspeed Retail API SDK for Node.js",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",