cityworks 1.0.6 → 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.
@@ -1,18 +1,18 @@
1
- export declare class RequestAdmin {
2
- /**
3
- * @hidden
4
- */
5
- cw: any;
6
- /**
7
- * @hidden
8
- */
9
- constructor(cw: any);
10
- /**
11
- * Get service request templates
12
- *
13
- * @category Requests Admin
14
- * @param {Object} searchData - search data
15
- * @return {Object} Returns Promise that represents a collection of all Service Request Templates
16
- */
17
- getTemplates(searchData: Object): Promise<unknown>;
18
- }
1
+ export declare class RequestAdmin {
2
+ /**
3
+ * @hidden
4
+ */
5
+ cw: any;
6
+ /**
7
+ * @hidden
8
+ */
9
+ constructor(cw: any);
10
+ /**
11
+ * Get service request templates
12
+ *
13
+ * @category Requests Admin
14
+ * @param {Object} searchData - search data
15
+ * @return {Object} Returns Promise that represents a collection of all Service Request Templates
16
+ */
17
+ getTemplates(searchData: Object): Promise<unknown>;
18
+ }
@@ -1,54 +1,54 @@
1
- export declare class RequestCosts {
2
- /**
3
- * @hidden
4
- */
5
- cw: any;
6
- /**
7
- * Storage of object's active activityType
8
- */
9
- currentActivityType: string;
10
- /**
11
- * @hidden
12
- */
13
- constructor(cw: any);
14
- /**
15
- * Get Cost Codes
16
- *
17
- * @category Labor Costs
18
- * @param {Array<number>} employeeSids - A list of Employee IDs for which to get the job codes.
19
- * @param {boolean} commonOnly - Set to true to get the Cost Codes that are common to ALL employees in the list, otherwise get all job codes that apply to at least one employee in the list.
20
- * @return {Object} Returns Promise that represents an object describing
21
- */
22
- getCodes(employeeSids: Object, commonOnly?: boolean): Promise<unknown>;
23
- /**
24
- * Get Job Codes
25
- *
26
- * @category Labor Costs
27
- * @return {Object} Returns Promise that represents an object describing
28
- */
29
- getJobCodes(): Promise<unknown>;
30
- /**
31
- * Add Request Labor Costs
32
- *
33
- * @category Request Costs
34
- * @param {Object} requestCosts - Array of inspection labor costings
35
- * @return {Object} Returns Promise that represents an object describing
36
- */
37
- addLabor(requestCosts: Array<Object>): Promise<unknown>;
38
- /**
39
- * Get Labor Costs for Request(s)
40
- *
41
- * @category Request Costs
42
- * @param {Array<number>} requestIds - Array of request Ids to get costs for
43
- * @return {Object} Returns Promise that represents an object describing
44
- */
45
- getLabor(requestIds: Array<number>): Promise<unknown>;
46
- /**
47
- * Delete Request Labor Costs
48
- *
49
- * @category Request Costs
50
- * @param {Array<number>} laborCostIds - Array of request labor cost Ids to delete
51
- * @return {Object} Returns Promise that represents an object describing
52
- */
53
- deleteLabor(laborCostIds: Array<number>): Promise<unknown>;
54
- }
1
+ export declare class RequestCosts {
2
+ /**
3
+ * @hidden
4
+ */
5
+ cw: any;
6
+ /**
7
+ * Storage of object's active activityType
8
+ */
9
+ currentActivityType: string;
10
+ /**
11
+ * @hidden
12
+ */
13
+ constructor(cw: any);
14
+ /**
15
+ * Get Cost Codes
16
+ *
17
+ * @category Labor Costs
18
+ * @param {Array<number>} employeeSids - A list of Employee IDs for which to get the job codes.
19
+ * @param {boolean} commonOnly - Set to true to get the Cost Codes that are common to ALL employees in the list, otherwise get all job codes that apply to at least one employee in the list.
20
+ * @return {Object} Returns Promise that represents an object describing
21
+ */
22
+ getCodes(employeeSids: Object, commonOnly?: boolean): Promise<unknown>;
23
+ /**
24
+ * Get Job Codes
25
+ *
26
+ * @category Labor Costs
27
+ * @return {Object} Returns Promise that represents an object describing
28
+ */
29
+ getJobCodes(): Promise<unknown>;
30
+ /**
31
+ * Add Request Labor Costs
32
+ *
33
+ * @category Request Costs
34
+ * @param {Object} requestCosts - Array of inspection labor costings
35
+ * @return {Object} Returns Promise that represents an object describing
36
+ */
37
+ addLabor(requestCosts: Array<Object>): Promise<unknown>;
38
+ /**
39
+ * Get Labor Costs for Request(s)
40
+ *
41
+ * @category Request Costs
42
+ * @param {Array<number>} requestIds - Array of request Ids to get costs for
43
+ * @return {Object} Returns Promise that represents an object describing
44
+ */
45
+ getLabor(requestIds: Array<number>): Promise<unknown>;
46
+ /**
47
+ * Delete Request Labor Costs
48
+ *
49
+ * @category Request Costs
50
+ * @param {Array<number>} laborCostIds - Array of request labor cost Ids to delete
51
+ * @return {Object} Returns Promise that represents an object describing
52
+ */
53
+ deleteLabor(laborCostIds: Array<number>): Promise<unknown>;
54
+ }
package/dist/search.d.ts CHANGED
@@ -1,138 +1,138 @@
1
- export declare class Search {
2
- /**
3
- * @hidden
4
- */
5
- cw: any;
6
- /**
7
- * Search Types: Null, Request, WorkOrder, Inspection, Contract, Permit, GIS, PermitTask, PermitAddress, InspCommon, Case, WorkOrderEntity, StoreTransaction, Requisition, Material, WorkActivity, MaterialLeaf, WoTemplate, Unknown, Employee, MessageQueue, Analytics, TokenState, AssetCalculationResult, Equipment, CustomerAccount, InspTemplate, ProblemLeaf, AssetSplitRecord, PavementInsp, TvInspection, Projects
8
- */
9
- searchTypes: Object;
10
- /**
11
- * @hidden
12
- */
13
- constructor(cw: any);
14
- /**
15
- * Do a "quick" search for an ID or Case Number
16
- *
17
- * @category Quick Search
18
- * @param {string} text - text to search the system for
19
- * @return {Object} Returns Promise object that represents a collection of the currently authenticated user's notifications
20
- */
21
- quick(text: string): Promise<unknown>;
22
- /**
23
- * Execute a saved search
24
- *
25
- * @category Search
26
- * @param {number} searchId - SearchId to execute
27
- * @param {Object} options - Other options. See: /{subdirectory}/apidocs/#/service-info/Ams/Search
28
- * @return {Object} Returns Promise object that represents a list of Objects
29
- */
30
- execute(searchId: number, options?: {
31
- EmployeeSid?: number;
32
- ExcludeEmptyXY?: boolean;
33
- Extent?: Object;
34
- Frequency?: boolean;
35
- IdsOnly?: boolean;
36
- IncludeSearchOrder?: boolean;
37
- MaxResults?: number;
38
- ResultFields?: Array<string>;
39
- TotalOnly?: boolean;
40
- }): Promise<unknown>;
41
- /**
42
- * Get a list of the saved searches by search type and specific entity types OR employeeSid/domainId. You cannot search for saved searches by both specific entity type AND employeeSid/domainId.
43
- *
44
- * @category Search
45
- * @param {string} searchType - Get the saved searches for a particular type
46
- * @param {Array<string>} [applyToEntities] - Restrict GIS searches to specified entity types
47
- * @param {number} [employeeSid] - The employee SID to retrieve the searches as
48
- * @param {number} [domainId] - The domain ID of the domain to search
49
- * @return {Object} Returns Promise object that represents a collection of SearchDefinitionName
50
- */
51
- getSaved(searchType: string, applyToEntities?: Array<string>, employeeSid?: number, domainId?: number): Promise<unknown>;
52
- /**
53
- * Get a list display fields for a Search Type
54
- *
55
- * @category Search Options
56
- * @param {string} searchType - Restrict GIS searches to specified entity types
57
- * @return {Object} Returns Promise object that represents a collection of SearchDisplayFields
58
- */
59
- displayFields(searchType: string): Promise<unknown>;
60
- /**
61
- * Get a list search types
62
- *
63
- * @category Search Options
64
- * @return {Object} Returns Promise object that represents a collection of SearchTypeInfo objects
65
- */
66
- types(): Promise<unknown>;
67
- /**
68
- * Enable Service URLs on Saved Searches
69
- *
70
- * @category Search Options
71
- * @param {Array<number>} searchIds - Search IDs to enable eURL on
72
- * @return {Object} Returns Promise object that represents a dictionary of SearchIds and EURL booleans
73
- */
74
- enableServices(searchIds: Array<number>): Promise<unknown>;
75
- /**
76
- * Disable Service URLs on Saved Searches
77
- *
78
- * @category Search Options
79
- * @param {Array<number>} searchIds - Search IDs to enable eURL on
80
- * @return {Object} Returns Promise object that represents a dictionary of SearchIds and EURL booleans
81
- */
82
- disableServices(searchIds: Array<number>): Promise<unknown>;
83
- /**
84
- * Get a search definition
85
- *
86
- * @category Search Definitions
87
- * @param {number} searchId - SearchId to get.
88
- * @param {number} employeeSid - Enforces employee security settings on search definition if provided.
89
- * @return {Object} Returns Promise object that represents a SearchDefinition object
90
- */
91
- getDefinition(searchId: number, employeeSid?: number): Promise<unknown>;
92
- /**
93
- * Get search definitions
94
- *
95
- * @category Search Definitions
96
- * @param {Array<number>} searchIds - SearchIds to get.
97
- * @param {number} employeeSid - Enforces employee security settings on search definition if provided.
98
- * @return {Object} Returns Promise object that represents a collection of SearchDefinition objects
99
- */
100
- getDefinitions(searchIds: Array<number>, employeeSid?: number): Promise<unknown>;
101
- /**
102
- * Get search definition names
103
- *
104
- * @category Search Definitions
105
- * @param {Array<number>} searchIds - SearchIds to get.
106
- * @return {Object} Returns Promise object that represents a collection of SearchDefinitionNames
107
- */
108
- getDefinitionNames(searchIds: Array<number>): Promise<unknown>;
109
- /**
110
- * Delete search definitions
111
- *
112
- * @category Search Definitions
113
- * @param {Array<number>} searchIds - SearchIds to get.
114
- * @return {Object} Returns Promise object that represents a list (dictionary) of search IDs and deletion success boolean
115
- */
116
- deleteDefinitions(searchIds: Array<number>): Promise<unknown>;
117
- /**
118
- * Save a search definition
119
- *
120
- * @category Search Definitions
121
- * @param {string} searchFor - Name of type to search for from searchTypes
122
- * @param {Object} options - Other options. See: /{subdirectory}/apidocs/#/service-info/Ams/Search
123
- * @param {number} searchId - SearchId to update. Defaults to "0" which is "Create new saved search"
124
- * @return {Object} Returns Promise object that represents a SearchDefinitionName object
125
- */
126
- saveDefinition(searchFor: string, options?: Object, searchId?: number): Promise<unknown>;
127
- /**
128
- * Convert a search definition to a query
129
- *
130
- * @category Search Definitions
131
- * @param {Array<number>} searchIds - searchIds to convert
132
- * @param {boolean} saveQuery - Automatically save a query which converts with no errors, default is false
133
- * @param {boolean} allowMultipleBooleanValues - Use all values for boolean fields even though a boolean should only have one value, default is false and will only use the first boolean value
134
- * @param {boolean} allowEmptyQuery - Create default filter when no filter is found, default is false
135
- * @return {Object} Returns Promise object that represents a SearchToQueryResult list
136
- */
137
- convertToQuery(searchIds: Array<number>, saveQuery?: boolean, addEurl?: boolean, allowMultipleBooleanValues?: boolean, allowEmptyQuery?: boolean): Promise<unknown>;
138
- }
1
+ export declare class Search {
2
+ /**
3
+ * @hidden
4
+ */
5
+ cw: any;
6
+ /**
7
+ * Search Types: Null, Request, WorkOrder, Inspection, Contract, Permit, GIS, PermitTask, PermitAddress, InspCommon, Case, WorkOrderEntity, StoreTransaction, Requisition, Material, WorkActivity, MaterialLeaf, WoTemplate, Unknown, Employee, MessageQueue, Analytics, TokenState, AssetCalculationResult, Equipment, CustomerAccount, InspTemplate, ProblemLeaf, AssetSplitRecord, PavementInsp, TvInspection, Projects
8
+ */
9
+ searchTypes: Object;
10
+ /**
11
+ * @hidden
12
+ */
13
+ constructor(cw: any);
14
+ /**
15
+ * Do a "quick" search for an ID or Case Number
16
+ *
17
+ * @category Quick Search
18
+ * @param {string} text - text to search the system for
19
+ * @return {Object} Returns Promise object that represents a collection of the currently authenticated user's notifications
20
+ */
21
+ quick(text: string): Promise<unknown>;
22
+ /**
23
+ * Execute a saved search
24
+ *
25
+ * @category Search
26
+ * @param {number} searchId - SearchId to execute
27
+ * @param {Object} options - Other options. See: /{subdirectory}/apidocs/#/service-info/Ams/Search
28
+ * @return {Object} Returns Promise object that represents a list of Objects
29
+ */
30
+ execute(searchId: number, options?: {
31
+ EmployeeSid?: number;
32
+ ExcludeEmptyXY?: boolean;
33
+ Extent?: Object;
34
+ Frequency?: boolean;
35
+ IdsOnly?: boolean;
36
+ IncludeSearchOrder?: boolean;
37
+ MaxResults?: number;
38
+ ResultFields?: Array<string>;
39
+ TotalOnly?: boolean;
40
+ }): Promise<unknown>;
41
+ /**
42
+ * Get a list of the saved searches by search type and specific entity types OR employeeSid/domainId. You cannot search for saved searches by both specific entity type AND employeeSid/domainId.
43
+ *
44
+ * @category Search
45
+ * @param {string} searchType - Get the saved searches for a particular type
46
+ * @param {Array<string>} [applyToEntities] - Restrict GIS searches to specified entity types
47
+ * @param {number} [employeeSid] - The employee SID to retrieve the searches as
48
+ * @param {number} [domainId] - The domain ID of the domain to search
49
+ * @return {Object} Returns Promise object that represents a collection of SearchDefinitionName
50
+ */
51
+ getSaved(searchType: string, applyToEntities?: Array<string>, employeeSid?: number, domainId?: number): Promise<unknown>;
52
+ /**
53
+ * Get a list display fields for a Search Type
54
+ *
55
+ * @category Search Options
56
+ * @param {string} searchType - Restrict GIS searches to specified entity types
57
+ * @return {Object} Returns Promise object that represents a collection of SearchDisplayFields
58
+ */
59
+ displayFields(searchType: string): Promise<unknown>;
60
+ /**
61
+ * Get a list search types
62
+ *
63
+ * @category Search Options
64
+ * @return {Object} Returns Promise object that represents a collection of SearchTypeInfo objects
65
+ */
66
+ types(): Promise<unknown>;
67
+ /**
68
+ * Enable Service URLs on Saved Searches
69
+ *
70
+ * @category Search Options
71
+ * @param {Array<number>} searchIds - Search IDs to enable eURL on
72
+ * @return {Object} Returns Promise object that represents a dictionary of SearchIds and EURL booleans
73
+ */
74
+ enableServices(searchIds: Array<number>): Promise<unknown>;
75
+ /**
76
+ * Disable Service URLs on Saved Searches
77
+ *
78
+ * @category Search Options
79
+ * @param {Array<number>} searchIds - Search IDs to enable eURL on
80
+ * @return {Object} Returns Promise object that represents a dictionary of SearchIds and EURL booleans
81
+ */
82
+ disableServices(searchIds: Array<number>): Promise<unknown>;
83
+ /**
84
+ * Get a search definition
85
+ *
86
+ * @category Search Definitions
87
+ * @param {number} searchId - SearchId to get.
88
+ * @param {number} employeeSid - Enforces employee security settings on search definition if provided.
89
+ * @return {Object} Returns Promise object that represents a SearchDefinition object
90
+ */
91
+ getDefinition(searchId: number, employeeSid?: number): Promise<unknown>;
92
+ /**
93
+ * Get search definitions
94
+ *
95
+ * @category Search Definitions
96
+ * @param {Array<number>} searchIds - SearchIds to get.
97
+ * @param {number} employeeSid - Enforces employee security settings on search definition if provided.
98
+ * @return {Object} Returns Promise object that represents a collection of SearchDefinition objects
99
+ */
100
+ getDefinitions(searchIds: Array<number>, employeeSid?: number): Promise<unknown>;
101
+ /**
102
+ * Get search definition names
103
+ *
104
+ * @category Search Definitions
105
+ * @param {Array<number>} searchIds - SearchIds to get.
106
+ * @return {Object} Returns Promise object that represents a collection of SearchDefinitionNames
107
+ */
108
+ getDefinitionNames(searchIds: Array<number>): Promise<unknown>;
109
+ /**
110
+ * Delete search definitions
111
+ *
112
+ * @category Search Definitions
113
+ * @param {Array<number>} searchIds - SearchIds to get.
114
+ * @return {Object} Returns Promise object that represents a list (dictionary) of search IDs and deletion success boolean
115
+ */
116
+ deleteDefinitions(searchIds: Array<number>): Promise<unknown>;
117
+ /**
118
+ * Save a search definition
119
+ *
120
+ * @category Search Definitions
121
+ * @param {string} searchFor - Name of type to search for from searchTypes
122
+ * @param {Object} options - Other options. See: /{subdirectory}/apidocs/#/service-info/Ams/Search
123
+ * @param {number} searchId - SearchId to update. Defaults to "0" which is "Create new saved search"
124
+ * @return {Object} Returns Promise object that represents a SearchDefinitionName object
125
+ */
126
+ saveDefinition(searchFor: string, options?: Object, searchId?: number): Promise<unknown>;
127
+ /**
128
+ * Convert a search definition to a query
129
+ *
130
+ * @category Search Definitions
131
+ * @param {Array<number>} searchIds - searchIds to convert
132
+ * @param {boolean} saveQuery - Automatically save a query which converts with no errors, default is false
133
+ * @param {boolean} allowMultipleBooleanValues - Use all values for boolean fields even though a boolean should only have one value, default is false and will only use the first boolean value
134
+ * @param {boolean} allowEmptyQuery - Create default filter when no filter is found, default is false
135
+ * @return {Object} Returns Promise object that represents a SearchToQueryResult list
136
+ */
137
+ convertToQuery(searchIds: Array<number>, saveQuery?: boolean, addEurl?: boolean, allowMultipleBooleanValues?: boolean, allowEmptyQuery?: boolean): Promise<unknown>;
138
+ }