cityworks 2.2.14 → 2.2.16

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.
@@ -0,0 +1,29 @@
1
+ export interface CWMetaData {
2
+ CWId?: string;
3
+ CwSid?: number;
4
+ DateModified?: Date | string;
5
+ FieldName?: string;
6
+ LoginName?: string;
7
+ NewValue?: string;
8
+ ObjectId?: number;
9
+ OldValue?: string;
10
+ TableName?: string;
11
+ }
12
+ export declare class AuditLogs {
13
+ /**
14
+ * @hidden
15
+ */
16
+ cw: any;
17
+ /**
18
+ * Storage of the active table name context.
19
+ */
20
+ currentTableName: string;
21
+ /**
22
+ * @hidden
23
+ */
24
+ constructor(cw: any, tableName: string);
25
+ /**
26
+ * Get audit log metadata by current table name context and SIDs.
27
+ */
28
+ get(ids: number | Array<number>): Promise<unknown>;
29
+ }
@@ -0,0 +1,85 @@
1
+ export interface ContractorTypeSearch {
2
+ ContractorDesc?: string;
3
+ ContractorType?: string;
4
+ ContractorTypeId?: number;
5
+ }
6
+ export interface ContractorPLLSearch {
7
+ BusinessName?: string;
8
+ ContractorId?: number;
9
+ }
10
+ export declare class ContractorType {
11
+ cw: any;
12
+ constructor(cw: any);
13
+ all(): Promise<unknown>;
14
+ search(filters: ContractorTypeSearch): Promise<unknown>;
15
+ searchObject(filters: ContractorTypeSearch): Promise<unknown>;
16
+ }
17
+ export interface ContractorBase {
18
+ ContractorSid?: number;
19
+ ContractorName?: string;
20
+ ContractorNumber?: string;
21
+ RateType?: string;
22
+ EmergencyFactor?: number;
23
+ OverheadRate?: number;
24
+ Rate?: number;
25
+ Description?: string;
26
+ OverheadType?: string;
27
+ ProviderType?: string;
28
+ OvertimeFactor?: number;
29
+ ContactName?: string;
30
+ Address?: string;
31
+ City?: string;
32
+ State?: string;
33
+ Zip?: string;
34
+ CellPhone?: string;
35
+ OfficePhone?: string;
36
+ Email?: string;
37
+ LocallyBased?: boolean;
38
+ Comments?: string;
39
+ Licensed?: boolean;
40
+ LicenseExpDate?: Date;
41
+ LicensedWork?: string;
42
+ Viewable?: boolean;
43
+ FederalTaxId?: string;
44
+ FMSNo?: string;
45
+ PIN?: string;
46
+ OtherPhone?: string;
47
+ Fax?: string;
48
+ MWBE?: boolean;
49
+ RegistrationDate?: Date;
50
+ LiabilityInsCertificate?: string;
51
+ LiabilityInsEffectDate?: Date;
52
+ LiabilityInsExpireDate?: Date;
53
+ LiabilityInsAmount?: number;
54
+ WorkersCompCertificate?: string;
55
+ WorkersCompEffectDate?: Date;
56
+ WorkersCompExpireDate?: Date;
57
+ WorkersCompAmount?: number;
58
+ AutomobileInsCertificate?: string;
59
+ AutomobileInsEffectDate?: Date;
60
+ AutomobileInsExpireDate?: Date;
61
+ AutomobileInsAmount?: number;
62
+ GeneralLiabilityCertificate?: string;
63
+ GeneralLiabilityEffectDate?: Date;
64
+ GeneralLiabilityExpireDate?: Date;
65
+ GeneralLiabilityAmount?: number;
66
+ ProvidesLabor?: boolean;
67
+ ProvidesMaterial?: boolean;
68
+ ProvidesEquipment?: boolean;
69
+ CustomFieldValues?: Record<number, string>;
70
+ }
71
+ export declare class Contractor {
72
+ cw: any;
73
+ type: ContractorType;
74
+ constructor(cw: any);
75
+ add(contractor: ContractorBase): Promise<unknown>;
76
+ update(contractorSid: number, contractorProperties: ContractorBase): Promise<unknown>;
77
+ all(viewableOnly?: boolean): Promise<unknown>;
78
+ getById(contractorSid: number): Promise<unknown>;
79
+ search(contractorSids: Array<number> | ContractorPLLSearch): Promise<unknown>;
80
+ customDataFields(contractorSid: number, custFieldIds?: Array<number>): Promise<unknown>;
81
+ delete(contractorSids: Array<number>): Promise<unknown>;
82
+ keywords(contractorSids: Array<number>): Promise<unknown>;
83
+ addKeywords(contractorSids: Array<number>, keywords: Array<string>): Promise<unknown>;
84
+ deleteKeywords(contractorSids: Array<number>, keywords: Array<string>, all?: boolean): Promise<unknown>;
85
+ }
@@ -0,0 +1,97 @@
1
+ import { EquipmentChangeout } from './equipment_changeout';
2
+ import { EquipmentCost } from './equipment_cost';
3
+ import { EquipmentReservation } from './equipment_reservation';
4
+ export interface EquipmentBase {
5
+ EquipmentUid?: string;
6
+ EquipmentSid?: number;
7
+ Category?: string;
8
+ DefaultImgPath?: string;
9
+ Description?: string;
10
+ Manufacturer?: string;
11
+ Model?: string;
12
+ ForCheckout?: boolean;
13
+ RateType?: string;
14
+ UnitCost?: number;
15
+ WarranteeDate?: Date;
16
+ Viewable?: boolean;
17
+ CustomFieldValues?: Record<number, string>;
18
+ }
19
+ export { EquipmentChangeout } from './equipment_changeout';
20
+ export { EquipmentCost } from './equipment_cost';
21
+ export { EquipmentReservation } from './equipment_reservation';
22
+ export type { EquipmentReadData, EquipmentChangeoutOperation } from './equipment_changeout';
23
+ export type { EquipmentCostOptions } from './equipment_cost';
24
+ export type { EquipmentReservationOptions } from './equipment_reservation';
25
+ /**
26
+ * A plugin that contains equipment methods for a Cityworks install
27
+ */
28
+ export declare class Equipment {
29
+ /**
30
+ * @hidden
31
+ */
32
+ cw: any;
33
+ /**
34
+ * Changeout operations for equipment
35
+ */
36
+ changeout: EquipmentChangeout;
37
+ /**
38
+ * Cost operations for equipment
39
+ */
40
+ cost: EquipmentCost;
41
+ /**
42
+ * Reservation operations for equipment
43
+ */
44
+ reservation: EquipmentReservation;
45
+ /**
46
+ * @hidden
47
+ */
48
+ constructor(cw: any);
49
+ /**
50
+ * Add new equipment
51
+ *
52
+ * @param {EquipmentBase} equipment - The equipment information. `EquipmentUid` is a required field.
53
+ * @return {Object} Returns Promise object that represents an object that is the newly-added equipment
54
+ */
55
+ add(equipment: EquipmentBase): Promise<unknown>;
56
+ /**
57
+ * Update existing equipment
58
+ *
59
+ * @param {number | Array<number>} equipmentSids - The SIDs of the equipment to update.
60
+ * @param {EquipmentBase} equipmentProperties - The equipment information to update. `EquipmentSid` cannot be included in the equipmentProperties object, as those are used to identify which equipment to update and could cause unintended consequences if included in the update information.
61
+ * @return {Object} Returns Promise object that represents an object that is the updated equipment
62
+ */
63
+ update(equipmentSids: number | Array<number>, equipmentProperties: EquipmentBase): Promise<unknown>;
64
+ /**
65
+ * Get equipment custom data fields by id
66
+ */
67
+ customDataFields(equipmentSid: number, custFieldIds?: Array<number>): Promise<unknown>;
68
+ /**
69
+ * Get all equipment
70
+ */
71
+ all(viewableOnly?: boolean): Promise<unknown>;
72
+ /**
73
+ * Get equipment by ID
74
+ */
75
+ getById(equipmentSid: number): Promise<unknown>;
76
+ /**
77
+ * Get equipment by IDs
78
+ */
79
+ getByIds(equipmentSids: Array<number>): Promise<unknown>;
80
+ /**
81
+ * Delete equipment by ID
82
+ */
83
+ delete(equipmentSids: Array<number>): Promise<unknown>;
84
+ /**
85
+ * Search for equipment
86
+ */
87
+ search(searchParameters: {
88
+ Description?: Array<string>;
89
+ EquipmentSid?: Array<number>;
90
+ EquipmentUid?: Array<string>;
91
+ ForCheckout?: boolean;
92
+ Manufacturer?: Array<string>;
93
+ Model?: Array<string>;
94
+ RateType?: Array<string>;
95
+ Viewable?: boolean;
96
+ }, maxResults?: number): Promise<unknown>;
97
+ }
@@ -0,0 +1,127 @@
1
+ export interface EquipmentReadData {
2
+ Id?: number;
3
+ Text1?: string;
4
+ Text2?: string;
5
+ Text3?: string;
6
+ Text4?: string;
7
+ Text5?: string;
8
+ Text6?: string;
9
+ Text7?: string;
10
+ Text8?: string;
11
+ Text9?: string;
12
+ Text10?: string;
13
+ Text11?: string;
14
+ Text12?: string;
15
+ Text13?: string;
16
+ Text14?: string;
17
+ Text15?: string;
18
+ Text16?: string;
19
+ Text17?: string;
20
+ Text18?: string;
21
+ Text19?: string;
22
+ Text20?: string;
23
+ Num1?: number;
24
+ Num2?: number;
25
+ Num3?: number;
26
+ Num4?: number;
27
+ Num5?: number;
28
+ Num6?: number;
29
+ Num7?: number;
30
+ Num8?: number;
31
+ Num9?: number;
32
+ Num10?: number;
33
+ Num11?: number;
34
+ Num12?: number;
35
+ Num13?: number;
36
+ Num14?: number;
37
+ Num15?: number;
38
+ Num16?: number;
39
+ Num17?: number;
40
+ Num18?: number;
41
+ Num19?: number;
42
+ Num20?: number;
43
+ Date1?: Date;
44
+ Date2?: Date;
45
+ Date3?: Date;
46
+ Date4?: Date;
47
+ Date5?: Date;
48
+ }
49
+ export interface EquipmentChangeoutOperation {
50
+ ChangeOutId: number;
51
+ Operation: number;
52
+ AssetType?: string;
53
+ NewUid?: string;
54
+ OldUid?: string;
55
+ RecordDate?: Date;
56
+ OperationComments?: string;
57
+ NewRead?: EquipmentReadData;
58
+ OldRead?: EquipmentReadData;
59
+ }
60
+ export declare class EquipmentChangeout {
61
+ cw: any;
62
+ constructor(cw: any);
63
+ addChangeOutRead(changeOutId: number, operationId: number, isNewRead: boolean, readData?: EquipmentReadData): Promise<unknown>;
64
+ addOperation(operation: EquipmentChangeoutOperation): Promise<unknown>;
65
+ attach(attachParams: {
66
+ ChangeOutId: number;
67
+ AssetType?: string;
68
+ NewUid: string;
69
+ NewRead?: EquipmentReadData;
70
+ OperationId?: number;
71
+ RecordDate?: Date;
72
+ OperationComments?: string;
73
+ FeatureType?: string;
74
+ FeatureUid?: string;
75
+ FeatureSid?: number;
76
+ Location?: string;
77
+ WorkOrderSid?: number;
78
+ WorkOrderId?: string;
79
+ InspectedBySid?: number;
80
+ ChangeDate?: Date;
81
+ ChangedById?: number;
82
+ UpdateMap?: boolean;
83
+ InspCustFieldCatId?: number;
84
+ }): Promise<unknown>;
85
+ detach(detachParams: {
86
+ ChangeOutId: number;
87
+ AssetType?: string;
88
+ OldUid: string;
89
+ OldRead?: EquipmentReadData;
90
+ OperationId?: number;
91
+ RecordDate?: Date;
92
+ OperationComments?: string;
93
+ FeatureType?: string;
94
+ FeatureUid?: string;
95
+ FeatureSid?: number;
96
+ Location?: string;
97
+ WorkOrderSid?: number;
98
+ WorkOrderId?: string;
99
+ InspectedBySid?: number;
100
+ ChangeDate?: Date;
101
+ ChangedById?: number;
102
+ UpdateMap?: boolean;
103
+ InspCustFieldCatId?: number;
104
+ }): Promise<unknown>;
105
+ replace(replaceParams: {
106
+ ChangeOutId: number;
107
+ AssetType?: string;
108
+ OldUid: string;
109
+ NewUid: string;
110
+ OldRead?: EquipmentReadData;
111
+ NewRead?: EquipmentReadData;
112
+ OperationId?: number;
113
+ RecordDate?: Date;
114
+ OperationComments?: string;
115
+ FeatureType?: string;
116
+ FeatureUid?: string;
117
+ FeatureSid?: number;
118
+ Location?: string;
119
+ WorkOrderSid?: number;
120
+ WorkOrderId?: string;
121
+ InspectedBySid?: number;
122
+ ChangeDate?: Date;
123
+ ChangedById?: number;
124
+ UpdateMap?: boolean;
125
+ InspCustFieldCatId?: number;
126
+ }): Promise<unknown>;
127
+ }
@@ -0,0 +1,31 @@
1
+ export interface EquipmentCostOptions {
2
+ AcctNum?: string;
3
+ ContractorEquipmentCost?: number;
4
+ ContractorEquipmentDescription?: string;
5
+ ContractorEquipmentId?: string;
6
+ ContractorSids?: Array<number>;
7
+ EquipmentSids?: Array<number>;
8
+ Estimated?: boolean;
9
+ FinishDate?: Date;
10
+ Hours?: number;
11
+ OperatorId?: number;
12
+ StartDate?: Date;
13
+ Units?: number;
14
+ }
15
+ export declare class EquipmentCost {
16
+ cw: any;
17
+ constructor(cw: any);
18
+ addInspectionCosts(inspectionId: number, options?: EquipmentCostOptions): Promise<unknown>;
19
+ addRequestCosts(requestId: number, options?: EquipmentCostOptions): Promise<unknown>;
20
+ addWorkOrderCosts(workOrderSid: number, options?: EquipmentCostOptions & {
21
+ WorkOrderId?: string;
22
+ TaskIds?: Array<number>;
23
+ Entities?: Array<any>;
24
+ }): Promise<unknown>;
25
+ deleteInspectionCosts(equipmentCostIds: Array<number>, estimated?: boolean): Promise<unknown>;
26
+ deleteRequestCosts(equipmentCostIds: Array<number>, estimated?: boolean): Promise<unknown>;
27
+ deleteWorkOrderCosts(equipmentCostIds: Array<number>, estimated?: boolean): Promise<unknown>;
28
+ inspectionCostsByInspection(inspectionIds: Array<number>, estimated?: boolean): Promise<unknown>;
29
+ requestCostsByRequest(requestIds: Array<number>, estimated?: boolean): Promise<unknown>;
30
+ workOrderCostsByWorkOrder(workOrderIds?: Array<string>, workOrderSids?: Array<number>, estimated?: boolean): Promise<unknown>;
31
+ }
@@ -0,0 +1,25 @@
1
+ export interface EquipmentReservationOptions {
2
+ WorkOrderId?: string;
3
+ WorkOrderSid?: number;
4
+ Comments?: string;
5
+ }
6
+ export declare class EquipmentReservation {
7
+ cw: any;
8
+ constructor(cw: any);
9
+ checkedOut(): Promise<unknown>;
10
+ checkIn(equipmentSid: number, employeeSid: number, options?: EquipmentReservationOptions): Promise<unknown>;
11
+ checkOut(equipmentSid: number, employeeSid: number, reservedToDate: Date, options?: EquipmentReservationOptions): Promise<unknown>;
12
+ checkOutHistory(equipmentSid?: number, employeeSid?: number): Promise<unknown>;
13
+ deleteReservation(transactionIds: Array<number>): Promise<unknown>;
14
+ reservations(equipmentSid: number, startDateTime?: Date, endDateTime?: Date): Promise<unknown>;
15
+ reserve(equipmentSid: number, employeeSid: number, transDateTime: Date, reservedToDate: Date, options?: EquipmentReservationOptions): Promise<unknown>;
16
+ status(equipmentSids: Array<number>): Promise<unknown>;
17
+ updateReservation(transactionId: number, updates: {
18
+ EmployeeSid?: number;
19
+ TransDateTime?: Date;
20
+ ReservedToDate?: Date;
21
+ WorkOrderId?: string;
22
+ WorkOrderSid?: number;
23
+ Comments?: string;
24
+ }): Promise<unknown>;
25
+ }
@@ -0,0 +1,42 @@
1
+ export interface CwHoliday {
2
+ Holiday: Date | string;
3
+ Description?: string;
4
+ }
5
+ export interface EurlQueryFindReplaceOptions {
6
+ QueryDefinitionIds?: Array<number>;
7
+ DomainIds?: Array<number>;
8
+ IsPublic?: boolean;
9
+ QueryIds?: Array<number>;
10
+ CreatedBySids?: Array<number>;
11
+ Configuration?: string;
12
+ }
13
+ export declare class GeneralAdmin {
14
+ /**
15
+ * @hidden
16
+ */
17
+ cw: any;
18
+ /**
19
+ * @hidden
20
+ */
21
+ constructor(cw: any);
22
+ /**
23
+ * Add a new holiday.
24
+ */
25
+ addHoliday(holiday: Date | string, description: string): Promise<unknown>;
26
+ /**
27
+ * Get all defined holidays with optional date filtering.
28
+ */
29
+ getHolidays(startDate?: Date | string, endDate?: Date | string): Promise<unknown>;
30
+ /**
31
+ * Get a holiday definition by date.
32
+ */
33
+ getHolidayByDate(date: Date | string): Promise<unknown>;
34
+ /**
35
+ * Delete holidays by date.
36
+ */
37
+ deleteHolidays(holidays: Array<Date | string>): Promise<unknown>;
38
+ /**
39
+ * Update text in Eurl Query Definition Configuration.
40
+ */
41
+ findReplaceConfigurationText(oldText: string, newText: string, options?: EurlQueryFindReplaceOptions): Promise<unknown>;
42
+ }