@commercelayer/sdk 5.0.0-beta.18 → 5.0.0-beta.19

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.
Files changed (2) hide show
  1. package/README.md +17 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -280,6 +280,23 @@ In general:
280
280
  ℹ️ Check our API reference for more information on how to [fetch relationships](https://docs.commercelayer.io/core/fetching-relationships).
281
281
  </details>
282
282
 
283
+ <details>
284
+ <summary>How to count resources</summary>
285
+ <br />
286
+
287
+ Many times you simply need to count how many resources exist with
288
+ certain characteristics. You can then call the special `count`
289
+ function passing a filter to get as result the total number of
290
+ resources.
291
+
292
+ ```javascript
293
+ // Get the total number of placed orders
294
+ const placedOrders = cl.orders.count({ filters: { status_eq: 'placed' } })
295
+
296
+ ```
297
+
298
+ </details>
299
+
283
300
  ### Update
284
301
 
285
302
  <details>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/sdk",
3
- "version": "5.0.0-beta.18",
3
+ "version": "5.0.0-beta.19",
4
4
  "main": "lib/cjs/index.js",
5
5
  "types": "lib/cjs/index.d.ts",
6
6
  "module": "lib/esm/index.js",
@@ -54,7 +54,7 @@
54
54
  "jsonapi-typescript": "^0.1.3",
55
55
  "lodash": "^4.17.21",
56
56
  "minimize-js": "^1.3.1",
57
- "semantic-release": "^20.1.3",
57
+ "semantic-release": "^21.0.0",
58
58
  "ts-node": "^10.9.1",
59
59
  "typescript": "^5.0.2"
60
60
  },