cityworks 2.2.9 → 2.2.10

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.
@@ -198,11 +198,11 @@ export declare class Briefcase {
198
198
  *
199
199
  * @category Cases
200
200
  * @param {number} caObjectId - The case Object ID to get
201
- * @param {number} configId - The configuration ID to get use
201
+ * @param {number} busCaseId - The business case template ID for which to get the custom columns configuration and data
202
202
  * @param {string} tableName - The name of the table to get custom data from
203
203
  * @return {Object} Returns Promise that represents a collection of custom fields with data for the case instance
204
204
  */
205
- getCustomData(caObjectId: number, configId: number, tableName: string): Promise<Array<any>>;
205
+ getCustomData(caObjectId: number, busCaseId: number, tableName: string): Promise<Array<any>>;
206
206
  /**
207
207
  * Move a Case point
208
208
  *
@@ -0,0 +1,165 @@
1
+ export interface EmployeeBase {
2
+ LastName: string;
3
+ FirstName?: string;
4
+ Email?: string;
5
+ Password?: string;
6
+ AdDomain?: string;
7
+ BenefitRate?: number;
8
+ BenefitType?: number;
9
+ DefaultImgPath?: string;
10
+ DomainId?: number;
11
+ EmailReq?: string;
12
+ EmployeeSid?: number;
13
+ EmployeeId?: string;
14
+ GroupIds?: Array<number>;
15
+ HolidayRate?: number;
16
+ HolidayType?: number;
17
+ HourlyRate?: number;
18
+ IsActive?: boolean;
19
+ IsDomain?: boolean;
20
+ LicenseCodes?: Array<string>;
21
+ LoginName?: string;
22
+ MapServiceId?: number;
23
+ MiddleInitial?: string;
24
+ MobileMapCacheId?: number;
25
+ Organization?: string;
26
+ OtherRate?: number;
27
+ OtherRateType?: number;
28
+ OverheadRate?: number;
29
+ OverheadType?: number;
30
+ OvertimeRate?: number;
31
+ OvertimeType?: number;
32
+ Pager?: string;
33
+ ShiftDiffRate?: number;
34
+ ShiftDiffType?: number;
35
+ StandbyRate?: number;
36
+ StandbyType?: number;
37
+ Title?: string;
38
+ UniqueName?: string;
39
+ WorkPhone?: string;
40
+ }
41
+ /**
42
+ * A plugin that contains "general" methods for a Cityworks install
43
+ */
44
+ export declare class Employee {
45
+ /**
46
+ * @hidden
47
+ */
48
+ cw: any;
49
+ /**
50
+ * @hidden
51
+ */
52
+ constructor(cw: any);
53
+ /**
54
+ * Add a new employee
55
+ *
56
+ * @param {EmployeeBase} employee - The employee information. `LastName` is a required field.
57
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
58
+ */
59
+ add(employee: EmployeeBase): Promise<unknown>;
60
+ /**
61
+ * Update existing employee(s)
62
+ *
63
+ * @param {number | Array<number>} employeeSids - The SIDs of the employees to update.
64
+ * @param {EmployeeBase} employee - The employee information to update. `LastName` is a required field. `EmployeeSid` and `EmployeeId` cannot be included in the employeeProperties object, as those are used to identify which employees to update and could cause unintended consequences if included in the update information.
65
+ * @return {Object} Returns Promise object that represents an object that is the updated user
66
+ */
67
+ update(employeeSids: number | Array<number>, employeeProperties: EmployeeBase): Promise<unknown>;
68
+ /**
69
+ * Get employee custom data fields by id
70
+ *
71
+ * @param {number} employeeSid - employeeSid with which the custom fields are associated
72
+ * @param {string} custFieldIds - which custom field IDs to retrieve.
73
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
74
+ */
75
+ customDataFields(employeeSid: number, custFieldIds?: Array<string>): Promise<unknown>;
76
+ /**
77
+ * Get all employees
78
+ *
79
+ * @param {string} activityType - which activity type the following ID will be for.
80
+ * @param {number} activityId - activity Case or CaseTask (task instance) ID to check
81
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
82
+ */
83
+ all(inactive?: boolean): Promise<unknown>;
84
+ /**
85
+ * Get the employees in the group with the given group ID.
86
+ *
87
+ * @param {string} groupId - Which group to get employee list.
88
+ * @param {number} inactive - Whether to include inactive employees.
89
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
90
+ */
91
+ byGroup(groupId: number, inactive?: boolean): Promise<unknown>;
92
+ /**
93
+ * Get employee by ID
94
+ *
95
+ * @param {string} employeeSid - The SID of the employee to retrieve.
96
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
97
+ */
98
+ getById(employeeSid: number): Promise<unknown>;
99
+ /**
100
+ * Get employees by IDs
101
+ *
102
+ * @param {Array<number>} employeeSids - The SIDs of the employees to retrieve.
103
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
104
+ */
105
+ getByIds(employeeSids: Array<number>): Promise<unknown>;
106
+ /**
107
+ * Delete by ID
108
+ *
109
+ * @param {Array<number>} employeeSids - The SIDs of the employees to delete.
110
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
111
+ */
112
+ delete(employeeSids: Array<number>): Promise<unknown>;
113
+ /**
114
+ * Get groups that given employees are member of by employee sids.
115
+ *
116
+ * @param {Array<number>} employeeSids - The SIDs of the employees to retrieve groups for.
117
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
118
+ */
119
+ getGroupsByEmployeeSid(employeeSids: Array<number>): Promise<unknown>;
120
+ /**
121
+ * Add a licenses to an employee
122
+ *
123
+ * @param {Array<number>} employeeIds - The IDs of the employees to whom to add licenses.
124
+ * @param {Array<string>} licenseCodes - The license codes to add.
125
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
126
+ */
127
+ addLicenses(employeeIds: Array<Number>, licenseCodes: Array<string>): Promise<unknown>;
128
+ /**
129
+ * Delete licenses from an employee
130
+ *
131
+ * @param {Array<number>} employeeIds - The IDs of the employees from whom to delete licenses.
132
+ * @param {Array<string>} licenseCodes - The license codes to delete.
133
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
134
+ */
135
+ deleteLicenses(employeeIds: Array<Number>, licenseCodes: Array<string>): Promise<unknown>;
136
+ /**
137
+ * Check names for uniqueness
138
+ *
139
+ * @param {Array<string>} namesToCheck - an array list of the names (strings) to check for uniqueness
140
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
141
+ */
142
+ checkNames(namesToCheck: Array<string>): Promise<unknown>;
143
+ /**
144
+ * Search for employees
145
+ *
146
+ * @param {Array<string>} searchParameters - an object of employee properties to search for. Support properties are: `AdDomain`, `DomainId`, `Email`, `EmployeeId`, `EmployeeSid`, `LoginName`, `UniqueName`, `FirstName`, `Lastname`, `FullName`, `IsUser`, `Organization`
147
+ * @param {boolean} active - search by active or all employees. Default is false (active only).
148
+ * @param {number} maxResults - the maximum number of results to return. Default is 20.
149
+ * @return {Object} Returns Promise object that represents an object that is the newly-added user
150
+ */
151
+ search(searchParameters: {
152
+ AdDomain?: Array<string>;
153
+ DomainId?: Array<number>;
154
+ Email?: Array<string>;
155
+ EmployeeId?: Array<string>;
156
+ EmployeeSid?: Array<number>;
157
+ LoginName?: Array<string>;
158
+ UniqueName?: Array<string>;
159
+ FirstName?: Array<string>;
160
+ LastName?: Array<string>;
161
+ FullName?: Array<string>;
162
+ IsUser?: Boolean;
163
+ Organization?: Array<string>;
164
+ }, active?: boolean, maxResults?: number): Promise<unknown>;
165
+ }
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { Request } from './request';
9
9
  import { Inspection } from './inspection';
10
10
  import { WorkOrder } from './workorder';
11
11
  import { Briefcase } from './briefcase';
12
+ import { Employee } from './employee';
12
13
  interface Citywork {
13
14
  }
14
15
  /**
@@ -228,4 +229,5 @@ declare const inspection: Inspection;
228
229
  declare const workorder: WorkOrder;
229
230
  declare const briefcase: Briefcase;
230
231
  declare const report: Report;
231
- export { cw as Cityworks, general, activity_link, message_queue, search, query, gis, request, inspection, workorder, briefcase, report };
232
+ declare const employee: Employee;
233
+ export { cw as Cityworks, general, activity_link, message_queue, search, query, gis, request, inspection, workorder, briefcase, report, employee };