@bibike/erp-sdk 1.1.5 → 1.1.7

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/dist/index.d.mts CHANGED
@@ -193,6 +193,7 @@ interface SaleItem {
193
193
  }
194
194
  interface CreateSaleInput {
195
195
  location_id?: number;
196
+ pos_session_id?: number;
196
197
  customer_id?: number;
197
198
  warehouse_id?: number;
198
199
  shop_id?: number;
@@ -820,9 +821,13 @@ declare class BibikeClient {
820
821
  /**
821
822
  * Get inventory for a specific location
822
823
  * Returns products with stock quantities at the specified location
824
+ * By default, excludes products with zero stock (ideal for POS)
823
825
  * @param locationId - The location ID to get inventory for
826
+ * @param options.includeZeroStock - Set to true to include products with zero quantity
824
827
  */
825
- inventory: (locationId: number) => Promise<ApiResponse<{
828
+ inventory: (locationId: number, options?: {
829
+ includeZeroStock?: boolean;
830
+ }) => Promise<ApiResponse<{
826
831
  location: Location;
827
832
  inventory: LocationInventoryItem[];
828
833
  }>>;
package/dist/index.d.ts CHANGED
@@ -193,6 +193,7 @@ interface SaleItem {
193
193
  }
194
194
  interface CreateSaleInput {
195
195
  location_id?: number;
196
+ pos_session_id?: number;
196
197
  customer_id?: number;
197
198
  warehouse_id?: number;
198
199
  shop_id?: number;
@@ -820,9 +821,13 @@ declare class BibikeClient {
820
821
  /**
821
822
  * Get inventory for a specific location
822
823
  * Returns products with stock quantities at the specified location
824
+ * By default, excludes products with zero stock (ideal for POS)
823
825
  * @param locationId - The location ID to get inventory for
826
+ * @param options.includeZeroStock - Set to true to include products with zero quantity
824
827
  */
825
- inventory: (locationId: number) => Promise<ApiResponse<{
828
+ inventory: (locationId: number, options?: {
829
+ includeZeroStock?: boolean;
830
+ }) => Promise<ApiResponse<{
826
831
  location: Location;
827
832
  inventory: LocationInventoryItem[];
828
833
  }>>;
package/dist/index.js CHANGED
@@ -359,10 +359,15 @@ var BibikeClient = class {
359
359
  /**
360
360
  * Get inventory for a specific location
361
361
  * Returns products with stock quantities at the specified location
362
+ * By default, excludes products with zero stock (ideal for POS)
362
363
  * @param locationId - The location ID to get inventory for
364
+ * @param options.includeZeroStock - Set to true to include products with zero quantity
363
365
  */
364
- inventory: async (locationId) => {
365
- return this.request("locations", "inventory", "GET", void 0, { id: locationId });
366
+ inventory: async (locationId, options) => {
367
+ return this.request("locations", "inventory", "GET", void 0, {
368
+ id: locationId,
369
+ include_zero_stock: options?.includeZeroStock ? "1" : void 0
370
+ });
366
371
  }
367
372
  };
368
373
  this.baseUrl = config.baseUrl.replace(/\/$/, "");
package/dist/index.mjs CHANGED
@@ -332,10 +332,15 @@ var BibikeClient = class {
332
332
  /**
333
333
  * Get inventory for a specific location
334
334
  * Returns products with stock quantities at the specified location
335
+ * By default, excludes products with zero stock (ideal for POS)
335
336
  * @param locationId - The location ID to get inventory for
337
+ * @param options.includeZeroStock - Set to true to include products with zero quantity
336
338
  */
337
- inventory: async (locationId) => {
338
- return this.request("locations", "inventory", "GET", void 0, { id: locationId });
339
+ inventory: async (locationId, options) => {
340
+ return this.request("locations", "inventory", "GET", void 0, {
341
+ id: locationId,
342
+ include_zero_stock: options?.includeZeroStock ? "1" : void 0
343
+ });
339
344
  }
340
345
  };
341
346
  this.baseUrl = config.baseUrl.replace(/\/$/, "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bibike/erp-sdk",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "TypeScript SDK for Bibike ERP API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",