cityworks 0.0.46 → 0.0.48

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.
@@ -7,6 +7,10 @@ export declare class Inspection {
7
7
  * Inspection Administration methods
8
8
  */
9
9
  admin?: Object;
10
+ /**
11
+ * Inspection Costing methods
12
+ */
13
+ costs: any;
10
14
  /**
11
15
  * @hidden
12
16
  */
@@ -342,4 +346,32 @@ export declare class Inspection {
342
346
  * @return {Object} Returns object that represents a collection of attachments from the matched inspections
343
347
  */
344
348
  getAttachments(inspectionIds: Array<number>): Promise<unknown>;
349
+ /**
350
+ * Get Map Layer Fields
351
+ *
352
+ * @category Inspections
353
+ * @param {number} requestId - The inspection ID to get the map layer fields for.
354
+ * @return {Object} Returns Promise that represents a collection of Objects describing the inspections
355
+ */
356
+ getMLFs(requestId: number): Promise<unknown>;
357
+ /**
358
+ * Update Map Layer Fields
359
+ *
360
+ * @category Inspections
361
+ * @param {number} requestId - The inspection ID to get the map layer fields for.
362
+ * @param {number} x
363
+ * @param {number} y
364
+ * @param {number} domainId - Domain ID
365
+ * @param {number} [z] - Optional Z coordinate
366
+ * @return {Object} Returns Promise that represents a ...
367
+ */
368
+ updateMLFs(requestId: number, x?: number, y?: number, domainId?: number, z?: number): Promise<unknown>;
369
+ /**
370
+ * Delete Map Layer Fields
371
+ *
372
+ * @category Inspections
373
+ * @param {number} inspectionId - The inspection ID to delete the map layer fields for.
374
+ * @return {Object} Returns Promise that represents a collection of Objects describing the workorders
375
+ */
376
+ deleteMLFs(inspectionId: number): Promise<unknown>;
345
377
  }
@@ -0,0 +1,86 @@
1
+ export declare class InspectionCosts {
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 Inspection Labor Costs
32
+ *
33
+ * @category Inspection Costs
34
+ * @param {number} inspectionId - Inspection ID to add labor costs to
35
+ * @param {number} hours - The hours to add to the inspection
36
+ * @param {Object} options - Additional settings for hours setting
37
+ * @param {boolean} estimated - Boolean, get estimated or real costs, defaults to false (get real by default)
38
+ * @return {Object} Returns Promise that represents an object describing
39
+ */
40
+ addLabor(inspectionId: number, hours: number, options?: object, estimated?: boolean): Promise<unknown>;
41
+ /**
42
+ * Get Labor Costs for a specific list of Inspections
43
+ *
44
+ * @category Inspection Costs
45
+ * @param {Array<int>} inspectionIds - An array of inspection IDs to get associated costs for.
46
+ * @param {boolean} estimated - Boolean, get estimated or real costs, defaults to false (get real by default)
47
+ * @return {Object} Returns Promise that represents an object describing
48
+ */
49
+ getLabor(inspectionIds: Array<number>, estimated?: boolean): Promise<unknown>;
50
+ /**
51
+ * Delete Inspection Labor Costs
52
+ *
53
+ * @category Inspection Costs
54
+ * @param {Array<int>} laborCostIds - An array of inspection labor cost IDs to delete
55
+ * @param {boolean} estimated - Boolean, delete estimated or real costs, defaults to false (delete real by default)
56
+ * @return {Object} Returns Promise that represents an object describing
57
+ */
58
+ deleteLabor(laborCostIds: Array<number>, estimated?: boolean): Promise<unknown>;
59
+ /**
60
+ * Add Inspection Equipment Costs
61
+ *
62
+ * @category Inspection Costs
63
+ * @param {Object} inspectionId - the inspection to add the equipment costs to
64
+ * @param {Object} options - additional options
65
+ * @return {Object} Returns Promise that represents an object describing
66
+ */
67
+ addEquipment(inspectionId: number, options: Object): Promise<unknown>;
68
+ /**
69
+ * Get Equipment Costs for Inspection(s)
70
+ *
71
+ * @category Inspection Costs
72
+ * @param {Array<number>} inspectionIds - the inspection to get the equipment costs for.
73
+ * @param {Object} estimated - get estimated equipment costs. Defaults to false.
74
+ * @return {Object} Returns Promise that represents an object describing
75
+ */
76
+ getEquipment(inspectionIds: number, estimated?: boolean): Promise<unknown>;
77
+ /**
78
+ * Delete Inspection Equipment Costs
79
+ *
80
+ * @category Inspection Costs
81
+ * @param {Array<number>} equipmentCostIds - the equipment cost IDs to delete.
82
+ * @param {Object} estimated - delete estimated equipment costs. Defaults to false.
83
+ * @return {Object} Returns Promise that represents an object describing
84
+ */
85
+ deleteEquipment(equipmentCostIds: Array<number>, estimated?: boolean): Promise<unknown>;
86
+ }
package/dist/request.d.ts CHANGED
@@ -7,6 +7,10 @@ export declare class Request {
7
7
  * Request Administration methods
8
8
  */
9
9
  admin?: any;
10
+ /**
11
+ * Request Costing methods
12
+ */
13
+ costs: any;
10
14
  /**
11
15
  * WorkOrder Comments methods
12
16
  */
@@ -333,4 +337,32 @@ export declare class Request {
333
337
  * @return {Object} Returns Promise that represents a collection of Problem WO Templates. See /{subdirectory}/apidocs/#/data-type-info;dataType=ProblemWOTemplate
334
338
  */
335
339
  getWOTemplates(problemSids: Array<number>, includeInactive?: boolean): Promise<unknown>;
340
+ /**
341
+ * Get Map Layer Fields
342
+ *
343
+ * @category Requests
344
+ * @param {number} requestId - The request ID to get the map layer fields for.
345
+ * @return {Object} Returns Promise that represents a collection of Objects describing the request map layer fields
346
+ */
347
+ getMLFs(requestId: number): Promise<unknown>;
348
+ /**
349
+ * Update Map Layer Fields
350
+ *
351
+ * @category Requests
352
+ * @param {number} requestId - The service request ID to get the map layer fields for.
353
+ * @param {number} x
354
+ * @param {number} y
355
+ * @param {number} domainId - Domain ID
356
+ * @param {number} [z] - Optional Z coordinate
357
+ * @return {Object} Returns Promise that represents a ...
358
+ */
359
+ updateMLFs(requestId: number, x?: number, y?: number, domainId?: number, z?: number): Promise<unknown>;
360
+ /**
361
+ * Delete Map Layer Fields
362
+ *
363
+ * @category Requests
364
+ * @param {number} requestId - The request ID to delete the map layer fields for.
365
+ * @return {Object} Returns Promise that represents a collection of Objects describing the deleted map layer fields
366
+ */
367
+ deleteMLFs(requestId: number): Promise<unknown>;
336
368
  }
@@ -0,0 +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
+ }
@@ -7,6 +7,10 @@ export declare class WorkOrder {
7
7
  * WorkOrder Administration methods
8
8
  */
9
9
  admin: any;
10
+ /**
11
+ * WorkOrder Costing methods
12
+ */
13
+ costs: any;
10
14
  /**
11
15
  * WorkOrder Comments methods
12
16
  */
@@ -289,4 +293,32 @@ export declare class WorkOrder {
289
293
  * @return {Object} Returns Promise that represents an array of string/string Expense Type options for workorders
290
294
  */
291
295
  getExpenseTypes(): Promise<unknown>;
296
+ /**
297
+ * Get Map Layer Fields
298
+ *
299
+ * @category WorkOrders
300
+ * @param {string} workOrderSId - The workorder S/ID to get the map layer fields for.
301
+ * @return {Object} Returns Promise that represents a collection of Objects describing the workorders
302
+ */
303
+ getMLFs(workOrderSId: string): Promise<unknown>;
304
+ /**
305
+ * Update Map Layer Fields
306
+ *
307
+ * @category WorkOrders
308
+ * @param {string} workOrderSId - The workorder S/ID to get the map layer fields for.
309
+ * @param {number} x
310
+ * @param {number} y
311
+ * @param {number} domainId - Should include WKT or WKID attribute. Can also include VcsWKID attribute.
312
+ * @param {number} [z] - Optional Z coordinate
313
+ * @return {Object} Returns Promise that represents a ...
314
+ */
315
+ updateMLFs(workOrderSId: string, x?: number, y?: number, domainId?: number, z?: number): Promise<unknown>;
316
+ /**
317
+ * Delete Map Layer Fields
318
+ *
319
+ * @category WorkOrders
320
+ * @param {string} workOrderSId - The workorder S/ID to delete the map layer fields for.
321
+ * @return {Object} Returns Promise that represents a collection of Objects describing the workorders
322
+ */
323
+ deleteMLFs(workOrderSId: string): Promise<unknown>;
292
324
  }
@@ -0,0 +1,113 @@
1
+ export declare class WorkOrderCosts {
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 WorkOrder Labor Costs
32
+ *
33
+ * @category WorkOrder Costs
34
+ * @param {number} workOrderSid - Array of inspection labor costings
35
+ * @param {number} hours - Number of hours to add
36
+ * @param {Object} options - options for the work order
37
+ * @return {Object} Returns Promise that represents an object describing
38
+ */
39
+ addLabor(workOrderSid: number, hours: number, options: Object): Promise<unknown>;
40
+ /**
41
+ * Get Labor Costs for WorkOrder(s)
42
+ *
43
+ * @category WorkOrder Costs
44
+ * @param {Array<number>} workOrderSids - Array of request Ids to get costs for
45
+ * @param {boolean} estimated - Whether to get estimates or actuals (defaults to false -- get actuals)
46
+ * @return {Object} Returns Promise that represents an object describing
47
+ */
48
+ getLabor(workOrderSids: Array<number>, estimated?: boolean): Promise<unknown>;
49
+ /**
50
+ * Delete WorkOrder Labor Costs
51
+ *
52
+ * @category WorkOrder Costs
53
+ * @param {Array<number>} laborCostIds - List of labor cost IDs to delete
54
+ * @param {boolean} estimated - Whether to delete estimates or actuals (defaults to false -- delete actuals)
55
+ * @return {Object} Returns Promise that represents an object describing
56
+ */
57
+ deleteLabor(laborCostIds: Array<number>, estimated?: boolean): Promise<unknown>;
58
+ /**
59
+ * Add WorkOrder Equipment Costs
60
+ *
61
+ * @category WorkOrder Costs
62
+ * @param {Object} workOrderSid - the work order to add the equipment costs to
63
+ * @param {Object} options - additional options
64
+ * @return {Object} Returns Promise that represents an object describing
65
+ */
66
+ addEquipment(workOrderSid: number, options: Object): Promise<unknown>;
67
+ /**
68
+ * Get Equipment Costs for WorkOrder(s)
69
+ *
70
+ * @category WorkOrder Costs
71
+ * @param {number} workOrderSid - the work order to add the equipment costs to
72
+ * @param {boolean} estimated - true to get estimated costs. defaults to false
73
+ * @return {Object} Returns Promise that represents an object describing
74
+ */
75
+ getEquipment(workOrderSid: number, estimated?: boolean): Promise<unknown>;
76
+ /**
77
+ * Delete WorkOrder Equipment Costs
78
+ *
79
+ * @category WorkOrder Costs
80
+ * @param {Object}
81
+ * @return {Object} Returns Promise that represents an object describing
82
+ */
83
+ deleteEquipment(equipmentCostIds: Array<number>, estimated?: boolean): Promise<unknown>;
84
+ /**
85
+ * Add WorkOrder Material Costs
86
+ *
87
+ * @category WorkOrder Costs
88
+ * @param {number} workOrderSid - Work Order SID number to add the material to
89
+ * @param {number} units - Decimal units for material
90
+ * @param {Object} options - Additional work order options
91
+ * @param {boolean} combineIssuesByMaterialSid - Combine issues with the same MaterialSid into a single commit, default is true
92
+ * @return {Object} Returns Promise that represents a collection describing the work order material costs
93
+ */
94
+ addMaterial(workOrderSid: number, units: number, options: Object, combineIssuesByMaterialSid?: boolean): Promise<unknown>;
95
+ /**
96
+ * Get Material Costs for WorkOrder(s)
97
+ *
98
+ * @category WorkOrder Costs
99
+ * @param {number} workOrderSid - the work order to add the equipment costs to
100
+ * @param {boolean} estimated - true to get estimated costs. defaults to false and gets actuals.
101
+ * @return {Object} Returns Promise that represents an object describing
102
+ */
103
+ getMaterial(workOrderSid: number, estimated?: boolean): Promise<unknown>;
104
+ /**
105
+ * Delete WorkOrder Material Costs
106
+ *
107
+ * @category WorkOrder Costs
108
+ * @param {Array<number>} materialCostIds - list of material cost IDs to delete
109
+ * @param {boolean} estimated - true to delete the estimated costs. defaults to false and deletes actuals.
110
+ * @return {Object} Returns Promise that represents an object describing
111
+ */
112
+ deleteMaterial(materialCostIds: number, estimated?: boolean): Promise<unknown>;
113
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cityworks",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "description": "A Cityworks API wrapper",
5
5
  "main": "dist/index.js",
6
6
  "umd:main": "dist/index.umd.js",