@lovrabet/sdk 1.4.1 → 1.4.2-beta.0

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
@@ -27,9 +27,9 @@
27
27
  ```typescript
28
28
  const result = await client.models.orders.aggregate({
29
29
  groupBy: ["status"],
30
- aggregations: [
31
- { field: "id", type: "count", alias: "orderCount" },
32
- { field: "amount", type: "sum", alias: "totalAmount" }
30
+ aggregate: [
31
+ { column: "id", type: "COUNT", alias: "orderCount" },
32
+ { column: "amount", type: "SUM", alias: "totalAmount" }
33
33
  ]
34
34
  });
35
35
  ```
@@ -517,10 +517,10 @@ const options = await client.models.users.getSelectOptions({
517
517
  const result = await client.models.orders.aggregate({
518
518
  where: { status: { $eq: "completed" } },
519
519
  groupBy: ["region"],
520
- aggregations: [
521
- { field: "id", type: "count", alias: "orderCount" },
522
- { field: "amount", type: "sum", alias: "totalAmount" },
523
- { field: "amount", type: "avg", alias: "avgAmount" }
520
+ aggregate: [
521
+ { column: "id", type: "COUNT", alias: "orderCount" },
522
+ { column: "amount", type: "SUM", alias: "totalAmount" },
523
+ { column: "amount", type: "AVG", alias: "avgAmount" }
524
524
  ],
525
525
  currentPage: 1,
526
526
  pageSize: 20