cityworks 0.0.37 → 0.0.39

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
@@ -6,6 +6,8 @@ Require the class:
6
6
 
7
7
  const Cityworks = require('cityworks')
8
8
 
9
+ import { Cityworks } from 'cityworks'
10
+
9
11
  Instantiate the Class for the instance of Cityworks available given a domain:
10
12
 
11
13
  let cw = new Cityworks('cw.domain.tld', {path: 'cityworks'})
@@ -23,11 +25,11 @@ Authenticate with the Cityworks install:
23
25
 
24
26
  Get the currently valid token in order to store it in a session or cookie:
25
27
 
26
- cityworks.getToken()
28
+ cw.getToken()
27
29
 
28
30
  Provide a saved token instead of the standard u/p auth:
29
31
 
30
- cityworks.setToken('mytoken')
32
+ cw.setToken('mytoken')
31
33
 
32
34
  ## Main method calls
33
35
 
@@ -2,14 +2,6 @@
2
2
  * Core interface Citywork which defines the access vars for many of the functions and the connection settings
3
3
  */
4
4
  interface Citywork {
5
- base_url: any;
6
- settings: Object;
7
- login?: string;
8
- password?: string;
9
- Token?: string;
10
- gisToken?: string;
11
- gisTokenUrl?: string;
12
- default_domain?: any;
13
5
  general?: Object;
14
6
  search?: Object;
15
7
  activity_link?: Object;
@@ -19,8 +11,6 @@ interface Citywork {
19
11
  workorder?: Object;
20
12
  request?: Object;
21
13
  case?: Object;
22
- extensions: Object;
23
- features: Object;
24
14
  }
25
15
  /**
26
16
  * Core class Cityworks with most of the authentication and install capabilities functions
@@ -29,36 +19,31 @@ export declare class Cityworks implements Citywork {
29
19
  /**
30
20
  * The domain of the cityworks install. Defaults to Cityworks Online
31
21
  */
32
- base_url: string;
22
+ private base_url;
33
23
  /**
34
24
  * Stores the currently in use authentication token
35
25
  */
36
- Token?: string;
26
+ private Token?;
37
27
  /**
38
28
  * Stores the login username
39
29
  */
40
- login?: string;
30
+ private login?;
41
31
  /**
42
32
  * Holds the login password
43
33
  */
44
- password?: string;
34
+ private password?;
45
35
  /**
46
36
  * Holds the GIS Token for GIS-based Authentication (Portal)
47
37
  */
48
- gisToken?: string;
38
+ private gisToken?;
49
39
  /**
50
40
  * Holds the GIS Token URL for GIS-based Authentication (Portal)
51
41
  */
52
- gisTokenUrl?: string;
42
+ private gisTokenUrl?;
53
43
  /**
54
44
  * Stores settings including path (defaults to "cityworks"), secure (defaults to true), expires (defaults to null - does not expire), default_domain
55
45
  */
56
- settings: {
57
- path: string;
58
- secure: boolean;
59
- expires: any;
60
- default_domain?: any;
61
- };
46
+ private settings;
62
47
  error?: Object;
63
48
  general?: Object;
64
49
  search?: Object;
@@ -69,9 +54,9 @@ export declare class Cityworks implements Citywork {
69
54
  inspection?: Object;
70
55
  workorder?: Object;
71
56
  case?: Object;
72
- extensions: Object;
73
- features: Object;
74
- potential_loads: Array<string>;
57
+ private extensions;
58
+ private features;
59
+ private potential_loads;
75
60
  /**
76
61
  * Contructor for a new cityworks instance's object, allows one to optionally configure the domain and other settings right from the get-go
77
62
  * @param {string} [base_url] - The first color, in hexadecimal format.