@commercelayer/sdk 5.0.0-beta.17 → 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.
- package/LICENSE +1 -1
- package/README.md +17 -0
- package/package.json +2 -2
package/LICENSE
CHANGED
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
21
|
+
SOFTWARE.
|
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.
|
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": "^
|
57
|
+
"semantic-release": "^21.0.0",
|
58
58
|
"ts-node": "^10.9.1",
|
59
59
|
"typescript": "^5.0.2"
|
60
60
|
},
|