@onemineral/pms-js-sdk 0.1.23 → 0.1.25

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