@baasix/sdk 0.1.16 → 0.1.18
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 +1 -0
- package/dist/index.cjs +23 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/items.cjs +22 -0
- package/dist/modules/items.cjs.map +1 -1
- package/dist/modules/items.d.cts +16 -0
- package/dist/modules/items.d.ts +16 -0
- package/dist/modules/items.js +22 -0
- package/dist/modules/items.js.map +1 -1
- package/dist/modules/schemas.cjs +1 -0
- package/dist/modules/schemas.cjs.map +1 -1
- package/dist/modules/schemas.d.cts +2 -0
- package/dist/modules/schemas.d.ts +2 -0
- package/dist/modules/schemas.js +1 -0
- package/dist/modules/schemas.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1223,6 +1223,25 @@ var QueryBuilder = class {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
return this;
|
|
1225
1225
|
}
|
|
1226
|
+
/**
|
|
1227
|
+
* Control whether the total record count is computed for this query.
|
|
1228
|
+
*
|
|
1229
|
+
* Pass `false` to skip the COUNT query (the response `totalCount` will be
|
|
1230
|
+
* `null`) — useful for read-heavy or infinite-scroll lists where the total
|
|
1231
|
+
* isn't needed. Pass `true` to force the count even when the deployment
|
|
1232
|
+
* default (env `COUNT_BY_DEFAULT`) is off. When omitted, the server default
|
|
1233
|
+
* applies.
|
|
1234
|
+
*
|
|
1235
|
+
* @example
|
|
1236
|
+
* ```typescript
|
|
1237
|
+
* // Skip the count for a faster list query
|
|
1238
|
+
* const { data } = await items.filter({ status: { eq: 'active' } }).withCount(false).get();
|
|
1239
|
+
* ```
|
|
1240
|
+
*/
|
|
1241
|
+
withCount(enabled = true) {
|
|
1242
|
+
this.queryParams.count = enabled;
|
|
1243
|
+
return this;
|
|
1244
|
+
}
|
|
1226
1245
|
/**
|
|
1227
1246
|
* Include soft-deleted items
|
|
1228
1247
|
*
|
|
@@ -1348,6 +1367,9 @@ var QueryBuilder = class {
|
|
|
1348
1367
|
if (this.queryParams.groupBy) {
|
|
1349
1368
|
params.groupBy = this.queryParams.groupBy;
|
|
1350
1369
|
}
|
|
1370
|
+
if (this.queryParams.count !== void 0) {
|
|
1371
|
+
params.count = this.queryParams.count;
|
|
1372
|
+
}
|
|
1351
1373
|
return params;
|
|
1352
1374
|
}
|
|
1353
1375
|
};
|
|
@@ -2091,6 +2113,7 @@ var SchemasModule = class {
|
|
|
2091
2113
|
* name: 'Order',
|
|
2092
2114
|
* timestamps: true,
|
|
2093
2115
|
* paranoid: true,
|
|
2116
|
+
* tenantScoped: true,
|
|
2094
2117
|
* fields: {
|
|
2095
2118
|
* id: {
|
|
2096
2119
|
* type: 'UUID',
|