cityworks 2.1.5 → 2.2.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.
@@ -22,4 +22,20 @@ export declare class InspectionAdmin {
22
22
  MinimumDateModified?: Date;
23
23
  TemplateIds?: Array<number>;
24
24
  }): Promise<unknown>;
25
+ /**
26
+ * Get inspection template by ID
27
+ *
28
+ * @category Inspection Templates
29
+ * @param {number} [templateId] - The ID of the template to retrieve
30
+ * @return {Object} Returns Promise that represents the Inspection template matching the provided ID
31
+ */
32
+ getTemplateById(templateId: number): Promise<any>;
33
+ /**
34
+ * Get inspection templates by IDs
35
+ *
36
+ * @category Inspection Templates
37
+ * @param {Array<number>} [templateIds] - The Entity Type(s) to return potential inspections for
38
+ * @return {Object} Returns Promise that represents a collection of all Inspection templates matching the provided IDs
39
+ */
40
+ getTemplatesByIds(templateIds: Array<number>): Promise<Array<any>>;
25
41
  }
package/dist/report.d.ts CHANGED
@@ -6,17 +6,42 @@ export declare class Report {
6
6
  /**
7
7
  * @hidden
8
8
  */
9
- constructor(cw: any);
9
+ request: any;
10
+ /**
11
+ * @hidden
12
+ */
13
+ inspection: any;
14
+ /**
15
+ * @hidden
16
+ */
17
+ workorder: any;
18
+ /**
19
+ * @hidden
20
+ */
21
+ briefcase: any;
22
+ /**
23
+ * @hidden
24
+ */
25
+ static downloadUrls(): {
26
+ request: string;
27
+ workorder: string;
28
+ inspection: string;
29
+ case: string;
30
+ };
31
+ /**
32
+ * @hidden
33
+ */
34
+ constructor(cw: any, inspection: any, workorder: any, request: any, briefcase: any);
10
35
  /**
11
36
  * Get the pdf "print" report for a specific CW node item
12
37
  *
13
38
  * @category Reports
14
39
  * @param {string} type - The node type (case, workorder, inspection, request)
15
40
  * @param {number} node_id - CaseDataGroupId as defined in CaseDataGroup admin.
16
- * @param {string} fileName - The filename of the report.
41
+ * @param {string} filename - The filename of the report.
17
42
  * @return {Object} Returns Promise that represents a file stream of a pdf
18
43
  */
19
- print(type: string, node_id: number | Array<number>, fileName?: string): Promise<unknown>;
44
+ print(type: string, node_id: number, filename?: string): Promise<unknown>;
20
45
  /**
21
46
  * Get the custom pdf report from a CW 15.x instance
22
47
  *
@@ -25,4 +50,22 @@ export declare class Report {
25
50
  * @return {Object} Returns Promise that represents a file stream of a pdf
26
51
  */
27
52
  get(type: string, node_id: number, fileName: string): Promise<unknown>;
53
+ /**
54
+ * @hidden
55
+ * Check on the filename for each
56
+ *
57
+ * @category Reports
58
+ * @param {string} type - The node type (case, workorder, inspection, request)
59
+ * @param {number} node_id - CaseDataGroupId as defined in CaseDataGroup admin.
60
+ * @param {string | undefined} filename - The filename of the report.
61
+ * @param {Object<[key: string]: any> | undefined} options - Additional options for the report.
62
+ * @return {Object} Returns Promise that represents a file stream of a pdf
63
+ */
64
+ resolveFileName(type: string, node_id: number, filename?: string | undefined, options?: {
65
+ [key: string]: any;
66
+ }): Promise<{
67
+ fn: string;
68
+ desc: string;
69
+ cn?: string;
70
+ }>;
28
71
  }
@@ -15,4 +15,12 @@ export declare class RequestAdmin {
15
15
  * @return {Object} Returns Promise that represents a collection of all Service Request Templates
16
16
  */
17
17
  getTemplates(searchData: Object): Promise<unknown>;
18
+ /**
19
+ * Get request template by ID
20
+ *
21
+ * @category Request Templates
22
+ * @param {number} [templateId] - The ID of the template to retrieve
23
+ * @return {Object} Returns Promise that represents the Request template matching the provided ID
24
+ */
25
+ getTemplateById(templateId: number): Promise<any>;
18
26
  }
@@ -28,6 +28,22 @@ export declare class WorkOrderAdmin {
28
28
  * @return {Object} Returns Promise that represents a collection of all WorkOrder templates
29
29
  */
30
30
  getTemplates(entityType: string, includeComments?: boolean, includeInstructions?: boolean): Promise<unknown>;
31
+ /**
32
+ * Get work order template by ID
33
+ *
34
+ * @category WorkOrders Admin
35
+ * @param {number} [templateId] - The ID of the template to retrieve
36
+ * @return {Object} Returns Promise that represents the WorkOrder template matching the provided ID
37
+ */
38
+ getTemplateById(templateId: number): Promise<any>;
39
+ /**
40
+ * Get work order templates by IDs
41
+ *
42
+ * @category WorkOrders Admin
43
+ * @param {Array<number>} [templateIds] - The Entity Type(s) to return potential work orders for
44
+ * @return {Object} Returns Promise that represents a collection of all WorkOrder templates matching the provided IDs
45
+ */
46
+ getTemplatesByIds(templateIds: Array<number>): Promise<Array<any>>;
31
47
  /**
32
48
  * Update WorkOrder template
33
49
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cityworks",
3
- "version": "2.1.5",
3
+ "version": "2.2.0",
4
4
  "description": "A Cityworks API wrapper",
5
5
  "main": "dist/index.js",
6
6
  "umd:main": "dist/index.umd.js",
@@ -40,16 +40,16 @@
40
40
  "devDependencies": {
41
41
  "chai": "~6.0.1",
42
42
  "chai-as-promised": "~8.0.2",
43
- "dotenv": "~17.2.1",
43
+ "dotenv": "~17.2.2",
44
44
  "jsdoc-to-markdown": "~9.1.2",
45
45
  "microbundle": "~0.15.1",
46
- "mocha": "~11.7.1",
47
- "typedoc": "~0.28.11",
46
+ "mocha": "~11.7.2",
47
+ "typedoc": "~0.28.13",
48
48
  "typescript": "^5.9.2",
49
49
  "winston": "~3.17.0"
50
50
  },
51
51
  "dependencies": {
52
- "axios": "^1.11.0",
52
+ "axios": "^1.12.2",
53
53
  "form-data": "^4.0.4",
54
54
  "lodash": "~4.17.21",
55
55
  "mime-types": "^3.0.1",