cityworks 2.0.0 → 2.1.0
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/dist/activity_link.d.ts +84 -0
- package/dist/attachments.d.ts +134 -0
- package/dist/briefcase.d.ts +274 -0
- package/dist/case_admin.d.ts +349 -0
- package/dist/case_assets.d.ts +89 -0
- package/dist/case_data.d.ts +214 -0
- package/dist/case_financial.d.ts +406 -0
- package/dist/case_people.d.ts +79 -0
- package/dist/case_workflow.d.ts +187 -0
- package/dist/comments.d.ts +53 -0
- package/dist/error.d.ts +57 -0
- package/dist/general.d.ts +78 -0
- package/dist/gis.d.ts +92 -0
- package/dist/index.d.ts +231 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.m.js +2 -0
- package/dist/index.m.js.map +1 -0
- package/dist/index.modern.mjs +2 -0
- package/dist/index.modern.mjs.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/inspection.d.ts +354 -0
- package/dist/inspection_admin.d.ts +25 -0
- package/dist/inspection_costs.d.ts +86 -0
- package/dist/message_queue.d.ts +73 -0
- package/dist/query.d.ts +108 -0
- package/dist/report.d.ts +28 -0
- package/dist/request.d.ts +369 -0
- package/dist/request_admin.d.ts +18 -0
- package/dist/request_costs.d.ts +54 -0
- package/dist/search.d.ts +138 -0
- package/dist/workorder.d.ts +333 -0
- package/dist/workorder_admin.d.ts +111 -0
- package/dist/workorder_costs.d.ts +113 -0
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import ReversibleMap from 'reversible-map';
|
|
2
|
+
/**
|
|
3
|
+
* A plugin that contains "comments" methods
|
|
4
|
+
*/
|
|
5
|
+
export declare class Comments {
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
cw: any;
|
|
10
|
+
/**
|
|
11
|
+
* Storage of all potential activity types which comments can be attached to: Unknown, Request, WorkOrder, CaTask, CaObject, CaCorrection, Project, Contract
|
|
12
|
+
*/
|
|
13
|
+
activityTypes: ReversibleMap<string, number>;
|
|
14
|
+
/**
|
|
15
|
+
* Storage of object's active activityType
|
|
16
|
+
*/
|
|
17
|
+
currentActivityType: string;
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
constructor(cw: any, activityType: string);
|
|
22
|
+
/**
|
|
23
|
+
* Add a comment - for adding a comment to an object when the object is already known. Always call comment.add from request, case, workorder, or inspection.
|
|
24
|
+
*
|
|
25
|
+
* @param {number} sid - The SID of the activity to which the comment should be attached
|
|
26
|
+
* @param {string} comment - The text for the comment
|
|
27
|
+
* @return {Object} Returns a Promise which represents a CommentRecord object
|
|
28
|
+
*/
|
|
29
|
+
add(sid: number, comment: string): Promise<unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* Update a comment
|
|
32
|
+
*
|
|
33
|
+
* @param {number} id - The ID of the comment which should be updated
|
|
34
|
+
* @param {string} comment - The new text for the updated comment
|
|
35
|
+
* @return {Object} Returns a Promise which represents a CommentRecord object
|
|
36
|
+
*/
|
|
37
|
+
update(id: number, comment: string): Promise<unknown>;
|
|
38
|
+
/**
|
|
39
|
+
* Get comments for activity items
|
|
40
|
+
*
|
|
41
|
+
* @param {Array<number>} sids - The options SIDs to get comments for.
|
|
42
|
+
* @return {Object} Returns Promise object that represents a collection of available comments
|
|
43
|
+
*/
|
|
44
|
+
get(sids: Array<number>): Promise<unknown>;
|
|
45
|
+
/**
|
|
46
|
+
* Get pre-defined comments for activityTypes
|
|
47
|
+
*
|
|
48
|
+
* @param {number} problemSid - The ProblemSid if currentActivityType is (Service) Request
|
|
49
|
+
* @param {string} [category] - Only applies to WorkOrder and ServiceRequest category comments.
|
|
50
|
+
* @return {Object} Returns Promise object that represents a collection of available comment templates.
|
|
51
|
+
*/
|
|
52
|
+
getPredefined(problemSid?: number, category?: string): Promise<unknown>;
|
|
53
|
+
}
|
package/dist/error.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export interface CWErrorMsgs {
|
|
2
|
+
MessageType: number;
|
|
3
|
+
Code: number;
|
|
4
|
+
Service: string;
|
|
5
|
+
Name: string;
|
|
6
|
+
DebugDetails: string;
|
|
7
|
+
DisplayText: string;
|
|
8
|
+
InnerMessage: string | null;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* CWErrorInt interface definition for implementation by CWError
|
|
12
|
+
*
|
|
13
|
+
* `{name: string, code: number, message: string, info?: string}`
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export interface CWErrorInt {
|
|
17
|
+
name: string;
|
|
18
|
+
code: number;
|
|
19
|
+
message: string;
|
|
20
|
+
error_messages?: Array<CWErrorMsgs>;
|
|
21
|
+
info?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* CWError implements a custom error class for this codebase with additional information
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
export declare class CWError implements CWErrorInt {
|
|
28
|
+
/**
|
|
29
|
+
* Just statically set to "Cityworks Exception" for now
|
|
30
|
+
*/
|
|
31
|
+
name: string;
|
|
32
|
+
/**
|
|
33
|
+
* Number for the thrown error (Efforts were made to make these unique when thrown throughout the codebase)
|
|
34
|
+
*/
|
|
35
|
+
code: number;
|
|
36
|
+
/**
|
|
37
|
+
* The error message
|
|
38
|
+
*/
|
|
39
|
+
message: string;
|
|
40
|
+
/**
|
|
41
|
+
* The error message
|
|
42
|
+
*/
|
|
43
|
+
error_messages: Array<CWErrorMsgs>;
|
|
44
|
+
/**
|
|
45
|
+
* Object stuffed with any other information one wishes to include in the thrown error
|
|
46
|
+
*/
|
|
47
|
+
info?: string;
|
|
48
|
+
/**
|
|
49
|
+
* CWError implements a custom error class for this codebase with additional information
|
|
50
|
+
*
|
|
51
|
+
* @param {number} code - Number for the thrown error (Efforts were made to make these unique when thrown throughout the codebase)
|
|
52
|
+
* @param {string} message - The error message
|
|
53
|
+
* @param {Object} info - Object stuffed with any other information one wishes to include in the thrown error
|
|
54
|
+
* @return {Object} Returns instance of CWError object
|
|
55
|
+
*/
|
|
56
|
+
constructor(code: number, message: string, info?: any);
|
|
57
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A plugin that contains "general" methods for a Cityworks install
|
|
3
|
+
*/
|
|
4
|
+
export declare class General {
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
cw: any;
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
constructor(cw: any);
|
|
13
|
+
/**
|
|
14
|
+
* Get notifications for currently authenticated user
|
|
15
|
+
*
|
|
16
|
+
* @return {Object} Returns Promise object that represents a collection of available notifications
|
|
17
|
+
*/
|
|
18
|
+
notifications(): Promise<unknown>;
|
|
19
|
+
/**
|
|
20
|
+
* Find out if the current user is watching a particular activity (case, task, null [as a string])
|
|
21
|
+
*
|
|
22
|
+
* @param {string} activityType - which activity type the following ID will be for.
|
|
23
|
+
* @param {number} activityId - activity Case or CaseTask (task instance) ID to check
|
|
24
|
+
* @return {Object} Returns Promise object that represents a boolean indicating the currently authenticated user is watching the provided activity
|
|
25
|
+
*/
|
|
26
|
+
amIWatching(activityType: any, activityId: number): Promise<unknown>;
|
|
27
|
+
/**
|
|
28
|
+
* Get CwMetatData by Type and CwSid
|
|
29
|
+
*
|
|
30
|
+
* @param {Array<number>} Ids
|
|
31
|
+
* @param {string} TableName - INSPECTION, REQUEST, WORKORDER require View permission on the activities
|
|
32
|
+
* @return {Object} Returns Promise object that represents a
|
|
33
|
+
*/
|
|
34
|
+
getActivityMetadataByIds(ids: Array<number>, table: string): Promise<unknown>;
|
|
35
|
+
/**
|
|
36
|
+
* Get recent history for authenticated user
|
|
37
|
+
*
|
|
38
|
+
* @return {Object} Returns Promise object that represents a collection of RecentActivity objects
|
|
39
|
+
*/
|
|
40
|
+
getHistory(): Promise<unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* Get cost summary for WorkOrder entities
|
|
43
|
+
*
|
|
44
|
+
* @param {Array<number>} ObjectIds
|
|
45
|
+
* @return {Object} Returns Promise object that represents a
|
|
46
|
+
*/
|
|
47
|
+
getWOEntityCostSummary(object_ids: Array<number>): Promise<unknown>;
|
|
48
|
+
/**
|
|
49
|
+
* Get cost summary for WorkOrder entities selected through a search definition
|
|
50
|
+
*
|
|
51
|
+
* @param {number} SearchId - Search Definition Id
|
|
52
|
+
* @return {Object} Returns Promise object that represents a
|
|
53
|
+
*/
|
|
54
|
+
searchWOEntityCostSummary(search_id: number): Promise<unknown>;
|
|
55
|
+
/**
|
|
56
|
+
* Get Holidays
|
|
57
|
+
*
|
|
58
|
+
* @param {Date} startDate - Date to search for Holidays, including this date.
|
|
59
|
+
* @param {Date} [endDate] - If not specified, Holidays _on_ startDate are returned. If specified, Holidays on startDate up to, but not including endDate are returned.
|
|
60
|
+
* @return {Object} Returns Promise object that represents a list of the holiday(s) found
|
|
61
|
+
*/
|
|
62
|
+
getHolidays(startDate: Date, endDate?: Date): Promise<unknown>;
|
|
63
|
+
/**
|
|
64
|
+
* Add Holidays
|
|
65
|
+
*
|
|
66
|
+
* @param {Date} holiday - The holiday's date
|
|
67
|
+
* @param {string} description - The holiday's name/description
|
|
68
|
+
* @return {Object} Returns Promise object that represents a
|
|
69
|
+
*/
|
|
70
|
+
addHolidays(holiday: Date, description: string): Promise<unknown>;
|
|
71
|
+
/**
|
|
72
|
+
* Delete Holidays
|
|
73
|
+
*
|
|
74
|
+
* @param {Array<Date>} holidays - List of datetimes which should have holidays deleted
|
|
75
|
+
* @return {Object} Returns Promise object that represents a
|
|
76
|
+
*/
|
|
77
|
+
deleteHolidays(holidays: Array<Date>): Promise<unknown>;
|
|
78
|
+
}
|
package/dist/gis.d.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export declare class Gis {
|
|
2
|
+
/**
|
|
3
|
+
* @hidden
|
|
4
|
+
*/
|
|
5
|
+
cw: any;
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
constructor(cw: any);
|
|
10
|
+
/**
|
|
11
|
+
* Get gis service configuration for user, group, domain, or service id
|
|
12
|
+
*
|
|
13
|
+
* @param {string} [whichType] - domain, group, mapservice, or user
|
|
14
|
+
* @param {number} [whichId] - domain, group, mapservice, or user Id
|
|
15
|
+
* @param {number} [getGisData] - If true, check for feature server JSON data, default is true
|
|
16
|
+
* @param {Array<string>} [context] Filter returned list by specific context, i.e. Office, Field, Mobile, Public, etc. Default is all.
|
|
17
|
+
* @return {Object} Returns Promise object that represents an Object with the desired GIS service definitions
|
|
18
|
+
*/
|
|
19
|
+
getConfig(whichType: any, whichId: any, getGisData?: boolean, context?: Array<string>): Promise<unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Get domain gis services
|
|
22
|
+
*
|
|
23
|
+
* @param {number} domainId - The mobile map cache Id to download
|
|
24
|
+
* @return {Object} Returns Promise object that represents an Object with the domain's default GIS services
|
|
25
|
+
*/
|
|
26
|
+
domain(domainId: any, getGisData?: boolean): Promise<unknown>;
|
|
27
|
+
/**
|
|
28
|
+
* Download mobile map cache
|
|
29
|
+
*
|
|
30
|
+
* @param {number} cacheId - The mobile map cache Id to download
|
|
31
|
+
* @return {Object} Returns Promise object that represents a streaming download (?)
|
|
32
|
+
*/
|
|
33
|
+
downloadMobile(cacheId: any, getGisData?: boolean): Promise<unknown>;
|
|
34
|
+
/**
|
|
35
|
+
* Get initial extent for user
|
|
36
|
+
*
|
|
37
|
+
* @return {Object} Returns Promise object that represents ... (?)
|
|
38
|
+
*/
|
|
39
|
+
initialExtent(): Promise<unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* Get service request gis services
|
|
42
|
+
*
|
|
43
|
+
* @param {number} requestId - The WorkOrder to check against.
|
|
44
|
+
* @param {boolean} getGisData - If true, check for feature server JSON data, default is true.
|
|
45
|
+
* @return {Object} Returns Promise object that represents an Object with the specified request's entit(y|ies)
|
|
46
|
+
*/
|
|
47
|
+
request(requestId: any, getGisData?: boolean): Promise<unknown>;
|
|
48
|
+
/**
|
|
49
|
+
* Get inspection gis services
|
|
50
|
+
*
|
|
51
|
+
* @param {number} inspectionId - The WorkOrder to check against.
|
|
52
|
+
* @param {boolean} getGisData - If true, check for feature server JSON data, default is true.
|
|
53
|
+
* @return {Object} Returns Promise object that represents an Object with the specified inspection's entity
|
|
54
|
+
*/
|
|
55
|
+
inspection(inspectionId: any, getGisData?: boolean): Promise<unknown>;
|
|
56
|
+
/**
|
|
57
|
+
* Get workorder gis services
|
|
58
|
+
*
|
|
59
|
+
* @param {number} workOrderSid - The WorkOrder to check against.
|
|
60
|
+
* @param {boolean} getGisData - If true, check for feature server JSON data, default is true.
|
|
61
|
+
* @return {Object} Returns Promise object that represents an Object with the specified WorkOrder's entit(y|ies)
|
|
62
|
+
*/
|
|
63
|
+
workOrder(workOrderSid: any, getGisData?: boolean): Promise<unknown>;
|
|
64
|
+
/**
|
|
65
|
+
* Get service request gis services
|
|
66
|
+
*
|
|
67
|
+
* @param {Array<string>} [context] Filter returned list by specific context, i.e. Office, Field, Mobile, Public, etc. Default is all.
|
|
68
|
+
* @param {boolean} [allDomains] services assigned to any domain the user belongs to, default is true
|
|
69
|
+
* @param {boolean} [allGroups] services assigned to any groups the user belongs to regardless of domain, default is true
|
|
70
|
+
* @param {boolean} [getGisData] If true, check for feature server JSON data, default is true
|
|
71
|
+
* @return {Object} Returns Promise object that represents an Object with the user's GIS services
|
|
72
|
+
*/
|
|
73
|
+
user(context?: Array<string>, allDomains?: boolean, allGroups?: boolean, getGisData?: boolean): Promise<unknown>;
|
|
74
|
+
/**
|
|
75
|
+
* Get Geocode server info by ServerId
|
|
76
|
+
*
|
|
77
|
+
* @param {number} ServiceId
|
|
78
|
+
* @return {Object} Returns Promise object that represents an object describing the provided Geocoder service configuration
|
|
79
|
+
*/
|
|
80
|
+
/**
|
|
81
|
+
* Get currently selected entities from the Cityworks install's session for your user
|
|
82
|
+
* @return {Object} Returns Promise object that represents an Object with the currently-selected entities
|
|
83
|
+
*/
|
|
84
|
+
selectedEntities(): Promise<unknown>;
|
|
85
|
+
/**
|
|
86
|
+
* Get attributes available for provided entity
|
|
87
|
+
*
|
|
88
|
+
* @param {string} entityType - The entity type to describe
|
|
89
|
+
* @return {Object} Returns Promise object that represents a collection of attribute description objects
|
|
90
|
+
*/
|
|
91
|
+
getEntityAttributes(entityType: string): Promise<unknown>;
|
|
92
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { General } from './general';
|
|
2
|
+
import { ActivityLinks } from './activity_link';
|
|
3
|
+
import { Gis } from './gis';
|
|
4
|
+
import { MessageQueue } from './message_queue';
|
|
5
|
+
import { Search } from './search';
|
|
6
|
+
import { Query } from './query';
|
|
7
|
+
import { Report } from './report';
|
|
8
|
+
import { Request } from './request';
|
|
9
|
+
import { Inspection } from './inspection';
|
|
10
|
+
import { WorkOrder } from './workorder';
|
|
11
|
+
import { Briefcase } from './briefcase';
|
|
12
|
+
interface Citywork {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Core class Cityworks with most of the authentication and install capabilities functions
|
|
16
|
+
*/
|
|
17
|
+
declare class Cityworks implements Citywork {
|
|
18
|
+
/**
|
|
19
|
+
* The domain of the cityworks install. Defaults to Cityworks Online
|
|
20
|
+
*/
|
|
21
|
+
private base_url;
|
|
22
|
+
/**
|
|
23
|
+
* Stores the currently in use authentication token
|
|
24
|
+
*/
|
|
25
|
+
private Token?;
|
|
26
|
+
/**
|
|
27
|
+
* Stores the login username
|
|
28
|
+
*/
|
|
29
|
+
private login?;
|
|
30
|
+
/**
|
|
31
|
+
* Holds the login password
|
|
32
|
+
*/
|
|
33
|
+
private password?;
|
|
34
|
+
/**
|
|
35
|
+
* Holds the GIS Token for GIS-based Authentication (Portal)
|
|
36
|
+
*/
|
|
37
|
+
private gisToken?;
|
|
38
|
+
/**
|
|
39
|
+
* Holds the GIS Token URL for GIS-based Authentication (Portal)
|
|
40
|
+
*/
|
|
41
|
+
private gisTokenUrl?;
|
|
42
|
+
/**
|
|
43
|
+
* Stores settings including path (defaults to "cityworks"), secure (defaults to true), expires (defaults to null - does not expire), default_domain
|
|
44
|
+
*/
|
|
45
|
+
private settings;
|
|
46
|
+
error?: any;
|
|
47
|
+
private extensions;
|
|
48
|
+
private features;
|
|
49
|
+
private potential_loads;
|
|
50
|
+
/**
|
|
51
|
+
* Contructor for a new cityworks instance's object, allows one to optionally configure the domain and other settings right from the get-go
|
|
52
|
+
* @param {string} [base_url] - The base url of your Cityworks instance
|
|
53
|
+
* @param {object} [settings] - The settings for your Cityworks site. Full list: {path: (defaults to "cityworks"), secure: defaults to true, expires: defaults to NULL, does not expire, default_domain: defaults to NULL, uses default user domain, version: defaults to 23, for 15.x set to 15}
|
|
54
|
+
* @param {array} [load] - allows user to choose which modules to load and make available. Full availability array: ['general', 'activity_link', 'message_queue', 'gis', 'workorder', 'inspection', 'request', 'case']
|
|
55
|
+
*/
|
|
56
|
+
constructor(base_url?: string, settings?: Object, load?: Array<string>);
|
|
57
|
+
/**
|
|
58
|
+
* Configure a new cityworks instance's domain and other settings
|
|
59
|
+
*
|
|
60
|
+
* @param {string} [base_url] - The first color, in hexadecimal format.
|
|
61
|
+
* @param {object} [settings] - The second color, in hexadecimal format.
|
|
62
|
+
* @param {array} [load] - allows user to choose which modules to load and make available. Full availability array: ['general', 'activity_link', 'message_queue', 'gis', 'search', 'workorder', 'inspection', 'request', 'report', 'case']
|
|
63
|
+
* @return {boolean} Returns true if successful, otherwise, throws error
|
|
64
|
+
*/
|
|
65
|
+
configure(base_url?: string, settings?: Object, load?: Array<string>): void;
|
|
66
|
+
/**
|
|
67
|
+
* Send a request to the Cityworks API
|
|
68
|
+
*
|
|
69
|
+
* If one ever needs to access or call an unimplemented API endpoint of a Cityworks install, one can call this method directly with the path and data payload:
|
|
70
|
+
*
|
|
71
|
+
* `cityworks.runRequest(service_path, post_data)`
|
|
72
|
+
*
|
|
73
|
+
* @param {string} service_path - The path to the particular endpoint
|
|
74
|
+
* @param {any} post_data - The data object to be sent to the Cityworks API
|
|
75
|
+
* @param {string} post_file - The path of the file to send to the Cityworks API
|
|
76
|
+
* @return {Object} Returns Promise object that represents the json object returned from the Cityworks API
|
|
77
|
+
*/
|
|
78
|
+
runRequest(service_path: string, post_data?: any, post_file?: string): Promise<unknown>;
|
|
79
|
+
/**
|
|
80
|
+
* Authenticate with the Cityworks API and store an access token for use. Stores the token on cityworks.Token.
|
|
81
|
+
* @param {string} login - User's login name
|
|
82
|
+
* @param {password} password - User's password
|
|
83
|
+
* @return {Object} Returns Promise object that represents a boolean which tells you the login succeeded (true) or failed (false).
|
|
84
|
+
*/
|
|
85
|
+
authenticate(login: string, password: string): Promise<unknown>;
|
|
86
|
+
/**
|
|
87
|
+
* Current version
|
|
88
|
+
* @return {number} Returns a number that is the currently configured version of the Cityworks platform. Defaults to "23".
|
|
89
|
+
*/
|
|
90
|
+
v(): number;
|
|
91
|
+
/**
|
|
92
|
+
* Authenticate a username with a GIS Token
|
|
93
|
+
* @param {login} - Gis user name, should match a Cityworks employee login name
|
|
94
|
+
* @param {string} gisToken - Gis Oauth2 access token
|
|
95
|
+
* @param {string} gisTokenUrl - Base url to GIS server (not the '/generateToken' endpoint)
|
|
96
|
+
* @param {number} [expires] - Authenticate to Cityworks for a specified number of milliseconds, defaults to 2 weeks
|
|
97
|
+
*/
|
|
98
|
+
authenticateWithGISToken(login: string, gisToken: string, gisTokenUrl: string, expires?: number): Promise<unknown>;
|
|
99
|
+
/**
|
|
100
|
+
* Validate provided token
|
|
101
|
+
* @param {string} token - User's login name
|
|
102
|
+
* @param {boolean} [set] - Set a valid token as the cityworks instance's active token
|
|
103
|
+
* @return {Object} Returns Promise object that represents a boolean which apprises one of the token's validity and that is was set (true) or throws an error if was not valid (and not set).
|
|
104
|
+
*/
|
|
105
|
+
validateToken(token: string, set?: boolean): Promise<unknown>;
|
|
106
|
+
/**
|
|
107
|
+
* Set a token you've retrieved from your storage system as the active token for the cityworks instance. Note that this doesn't check the token for validity.
|
|
108
|
+
* @param {token} token - The token string to set as the active token.
|
|
109
|
+
* @return {boolean} Returns a boolean which apprises one that the token was set (true) or not set (false).
|
|
110
|
+
*/
|
|
111
|
+
setToken(token: any): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Get currently set, valid token
|
|
114
|
+
* @param {token} token - The token string to set as the active token.
|
|
115
|
+
* @return {string} Returns a string which is the currently-set token or the boolean false value if no (valid) token set
|
|
116
|
+
*/
|
|
117
|
+
getToken(): string | false;
|
|
118
|
+
/**
|
|
119
|
+
* Revoke all current user's tokens or only tokens created before a particular date and time.
|
|
120
|
+
* @param {number} [revokeBefore] - Datetime as an Epoch integer (number), if you wish to revoke only tokens created before a particular datetime
|
|
121
|
+
* @return {Object} Returns Promise object that represents a boolean which apprises one of the revocation outcome's success (true) or failure (false)
|
|
122
|
+
*/
|
|
123
|
+
revokeToken(revokeBefore?: number): Promise<unknown>;
|
|
124
|
+
/**
|
|
125
|
+
* Get the localization settings for current Cityworks install
|
|
126
|
+
* @return {Object} Returns Promise object that represents an Object which contains all the localization settings for the current Cityworks install
|
|
127
|
+
*/
|
|
128
|
+
getLocalizationSettings(): Promise<unknown>;
|
|
129
|
+
/**
|
|
130
|
+
* Get the system timezone options for current Cityworks install
|
|
131
|
+
* @return {Object} Returns Promise object that represents an Object which contains all the timezone settings for the currentCityworks install
|
|
132
|
+
*/
|
|
133
|
+
getTimezoneOptions(): Promise<unknown>;
|
|
134
|
+
/**
|
|
135
|
+
* Get the current install's location information
|
|
136
|
+
* @return {Object} Returns Promise object that represents an Object which contains the location information
|
|
137
|
+
*/
|
|
138
|
+
getCurrentLocation(): Promise<unknown>;
|
|
139
|
+
/**
|
|
140
|
+
* Check if a particular license is available to the currently-authenticated user
|
|
141
|
+
* @param {string} area - Area of access
|
|
142
|
+
* @param {string} service - Service to access
|
|
143
|
+
* @return {boolean} Returns Promise object that represents a boolean which informs access is granted (true) or denied (false)
|
|
144
|
+
*/
|
|
145
|
+
licensedApiCheck(area: string, service: string): Promise<unknown>;
|
|
146
|
+
/**
|
|
147
|
+
* Check if a current Cityworks install is licensed to use a particular extension
|
|
148
|
+
*
|
|
149
|
+
* Possible extensions currently include: "UnknownExtension", "CwAnalytics", "WebHooks", "PLLPublicApp", "ActivityUpdate", "SingleSignOn"
|
|
150
|
+
*
|
|
151
|
+
* @param {string} extension - Extension name
|
|
152
|
+
* @return {boolean} Returns Promise object that represents a boolean which informs extension is licensed (true) or not (false)
|
|
153
|
+
*/
|
|
154
|
+
licensedExtensionCheck(extension: string): Promise<unknown>;
|
|
155
|
+
/**
|
|
156
|
+
* Check a whole list to see if current Cityworks install is licensed to use extensions
|
|
157
|
+
*
|
|
158
|
+
* Possible extensions currently include: "UnknownExtension", "CwAnalytics", "WebHooks", "PLLPublicApp", "ActivityUpdate", "SingleSignOn"
|
|
159
|
+
*
|
|
160
|
+
* @param {Array<string>} extension - Extension names
|
|
161
|
+
* @return {Object} Returns Promise object that represents a boolean which informs extension is licensed (true) or not (false)
|
|
162
|
+
*/
|
|
163
|
+
licensedExtensionsCheck(extensions: Array<string>): Promise<unknown>;
|
|
164
|
+
/**
|
|
165
|
+
* Check if current user is licensed to use a feature:
|
|
166
|
+
*
|
|
167
|
+
* "UnknownFeature", "ViewInspections", "EditInspections", "ViewServiceRequest", "EditServiceRequest", "ViewWorkOrder", "EditWorkOrder", "EquipmentCheckOut", "OfficeField", "Respond", "Eurl", "PaverInterface", "Contracts", "Storeroom", "PLL", "Cw4XL", "TableEditor", "CCTVInterface", "MobileAndroid", "MobileiOS", "PerformanceBudgeting", "Insights", "RespondCase", "RespondInspection", "RespondServiceRequest", "RespondTaskManager", "RespondWorkOrder", "Workload", "OpX", "TrimbleUnityMobile", "TrimbleVegetationManager"
|
|
168
|
+
*
|
|
169
|
+
* @param {string} [feature] - Feature to check to see if ciurrently authenticated user can utilize
|
|
170
|
+
* @return {Object} Returns Promise object that represents a boolean which communicates license state as licensed (true) or not (false)
|
|
171
|
+
*/
|
|
172
|
+
licensedFeatureCheck(feature: string): Promise<unknown>;
|
|
173
|
+
/**
|
|
174
|
+
* Check if current user is licensed to use features:
|
|
175
|
+
*
|
|
176
|
+
* "UnknownFeature", "ViewInspections", "EditInspections", "ViewServiceRequest", "EditServiceRequest", "ViewWorkOrder", "EditWorkOrder", "EquipmentCheckOut", "OfficeField", "Respond", "Eurl", "PaverInterface", "Contracts", "Storeroom", "PLL", "Cw4XL", "TableEditor", "CCTVInterface", "MobileAndroid", "MobileiOS", "PerformanceBudgeting", "Insights", "RespondCase", "RespondInspection", "RespondServiceRequest", "RespondTaskManager", "RespondWorkOrder", "Workload", "OpX", "TrimbleUnityMobile", "TrimbleVegetationManager"
|
|
177
|
+
*
|
|
178
|
+
* @param {Array<string>} [feature] - Features to check to see if currently authenticated user can utilize
|
|
179
|
+
* @return {Object} Returns Promise object that represents a boolean which communicates license state as licensed (true) or not (false)
|
|
180
|
+
*/
|
|
181
|
+
licensedFeaturesCheck(features: Array<string>): Promise<unknown>;
|
|
182
|
+
/**
|
|
183
|
+
* Check if current user is licensed to use services. List req ServicesList of 'Area/Service', i.e.:
|
|
184
|
+
*
|
|
185
|
+
* ['AMS/Inspection','AMS/WorkOrder','PLL/Case']
|
|
186
|
+
*
|
|
187
|
+
* @param {Array<string>} [services] - Services to check to see if currently authenticated user can utilize
|
|
188
|
+
* @return {Object} Returns Promise object that represents a boolean which communicates license state as licensed (true) or not (false)
|
|
189
|
+
*/
|
|
190
|
+
licensedServicesCheck(services: Array<string>): Promise<unknown>;
|
|
191
|
+
/**
|
|
192
|
+
* Get a list of CityworksOnline sites for this user
|
|
193
|
+
*
|
|
194
|
+
* @param {string} [login] - Login Name to use when checking. Defaults to previously-stored login name.
|
|
195
|
+
* @param {string} [password] - Password to use when checking. Defaults to previously-stored password.
|
|
196
|
+
* @return {Object} Returns Promise object that represents an array of cityworks online sites available to this user.
|
|
197
|
+
*/
|
|
198
|
+
cityworksOnlineSites(login?: string, password?: string): Promise<unknown>;
|
|
199
|
+
/**
|
|
200
|
+
* Get a list of Domains (not tld, but organizations) in the currently-connected Cityworks install
|
|
201
|
+
*
|
|
202
|
+
* @return {Object} Returns Promise object that represents a collection of the configured domains.
|
|
203
|
+
*/
|
|
204
|
+
domains(): Promise<unknown>;
|
|
205
|
+
/**
|
|
206
|
+
* Get a list of Domains (not tld, but organizations) in the currently-connected Cityworks install
|
|
207
|
+
*
|
|
208
|
+
* @param {string} [login] - Optional login name to get user information for. Defaults to currently-set user name used for login.
|
|
209
|
+
* @return {Object} Returns Promise object that represents an Object with the user information
|
|
210
|
+
*/
|
|
211
|
+
user(login?: string): Promise<unknown>;
|
|
212
|
+
/**
|
|
213
|
+
* Get the software version number of the currently-connected Cityworks install
|
|
214
|
+
*
|
|
215
|
+
* @return {Object} Returns Promise object that represents a string of the version number
|
|
216
|
+
*/
|
|
217
|
+
version(): Promise<unknown>;
|
|
218
|
+
}
|
|
219
|
+
declare const cw: Cityworks;
|
|
220
|
+
declare const general: General;
|
|
221
|
+
declare const activity_link: ActivityLinks;
|
|
222
|
+
declare const message_queue: MessageQueue;
|
|
223
|
+
declare const search: Search;
|
|
224
|
+
declare const query: Query;
|
|
225
|
+
declare const report: Report;
|
|
226
|
+
declare const gis: Gis;
|
|
227
|
+
declare const request: Request;
|
|
228
|
+
declare const inspection: Inspection;
|
|
229
|
+
declare const workorder: WorkOrder;
|
|
230
|
+
declare const briefcase: Briefcase;
|
|
231
|
+
export { cw as Cityworks, general, activity_link, message_queue, search, query, gis, request, inspection, workorder, briefcase, report };
|