@tspvivek/baasix-sdk 0.1.0-alpha.6 → 0.1.0-alpha.8

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.
@@ -381,6 +381,8 @@ interface IndexDefinition {
381
381
  name: string;
382
382
  fields: string[];
383
383
  unique?: boolean;
384
+ /** When true, NULL values are considered equal for unique indexes (PostgreSQL 15+) */
385
+ nullsNotDistinct?: boolean;
384
386
  }
385
387
  type RelationshipType = "M2O" | "O2M" | "M2M" | "M2A" | "O2O";
386
388
  interface RelationshipDefinition {
@@ -381,6 +381,8 @@ interface IndexDefinition {
381
381
  name: string;
382
382
  fields: string[];
383
383
  unique?: boolean;
384
+ /** When true, NULL values are considered equal for unique indexes (PostgreSQL 15+) */
385
+ nullsNotDistinct?: boolean;
384
386
  }
385
387
  type RelationshipType = "M2O" | "O2M" | "M2M" | "M2A" | "O2O";
386
388
  interface RelationshipDefinition {
package/dist/index.cjs CHANGED
@@ -1497,14 +1497,15 @@ var ItemsModule = class {
1497
1497
  *
1498
1498
  * @example
1499
1499
  * ```typescript
1500
- * // Update by IDs
1500
+ * // Update by IDs with same data
1501
1501
  * await items.updateMany(['id1', 'id2'], { status: 'archived' });
1502
1502
  * ```
1503
1503
  */
1504
1504
  async updateMany(ids, data) {
1505
+ const updates = ids.map((id) => ({ id, data }));
1505
1506
  const response = await this.client.patch(
1506
1507
  `/items/${this.collection}/bulk`,
1507
- { ids, data }
1508
+ updates
1508
1509
  );
1509
1510
  return response.data;
1510
1511
  }
@@ -1547,7 +1548,7 @@ var ItemsModule = class {
1547
1548
  */
1548
1549
  async deleteMany(ids) {
1549
1550
  await this.client.delete(`/items/${this.collection}/bulk`, {
1550
- params: { ids }
1551
+ body: JSON.stringify(ids)
1551
1552
  });
1552
1553
  }
1553
1554
  /**