@onemineral/pms-js-sdk 0.1.23 → 0.1.24

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 +49 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1 +1,49 @@
1
- # One Mineral PMS Javascript SDK
1
+ # Rentalwise Javascript SDK
2
+
3
+ ## Install
4
+
5
+ **npm**
6
+
7
+ `npm install @onemineral/pms-js-sdk`
8
+
9
+ **yarn**
10
+
11
+ `yarn add @onemineral/pms-js-sdk`
12
+
13
+
14
+ ## Initialize the sdk
15
+
16
+
17
+ ```js
18
+ const pmsClient = newPmsClient({
19
+ baseURL: 'https://demo.rentalwise.io/rest/',
20
+ defaultHeaders: {
21
+ 'Authorization': process.env.RENTALWISE_API_TOKEN,
22
+ },
23
+ });
24
+ ```
25
+
26
+ ## Query properties
27
+
28
+
29
+ ```js
30
+ const properties = await pmsClient.property.query({
31
+ paginate: {
32
+ page: 1,
33
+ perpage: 10,
34
+ },
35
+ // Apply conditions on property fields
36
+ // e.g. query only enabled properties
37
+ where: {
38
+ conditions: [
39
+ {
40
+ field: 'status',
41
+ in: ['enabled'],
42
+ },
43
+ ],
44
+ },
45
+ // Include property relationships in response
46
+ // e.g. include property location in the response
47
+ with: ['location'],
48
+ });
49
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onemineral/pms-js-sdk",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "One Mineral PMS Javascript SDK",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",