cityworks 1.0.6 → 2.0.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,348 +0,0 @@
1
- export declare class CaseFinancial {
2
- /**
3
- * @hidden
4
- */
5
- cw: any;
6
- /**
7
- * @hidden
8
- */
9
- constructor(cw: Object);
10
- /**
11
- * Adds a fee to the case specified by the CaObectId.
12
- *
13
- * @category Case Fees
14
- * @param {number} caObjectId - The Case Object ID for the case to which to add the fee
15
- * @param {number} feeSetupId - The fee setup id for the fee to add to the case.
16
- * @param {Object} [options] - See /{subdirectory}/apidocs/#/service-info/Pll/CaseFees for more options. (Checkboxes -- Autorecalculate -- are Y/N strings)
17
- * @return {Object} Returns Promise that represents an object describing the newly-added fee. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaFeesItemBase
18
- */
19
- addFee(caObjectId: number, feeSetupId: number, options?: Object): Promise<unknown>;
20
- /**
21
- * Add Case Fee Payment. Adds a payment to the case fee specified by caObjectId.
22
- *
23
- * @category Case Payments
24
- * @param {number} caObjectId - The Case Object ID for the case to which to add the fee
25
- * @param {Object} options - See /{subdirectory}/apidocs/#/service-info/Pll/CasePayment for more options, including required fields.
26
- * @return {Object} Returns Promise that represents an object describing the newly-added payment. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaPaymentItemBase
27
- */
28
- addPayment(caObjectId: number, options: Object): Promise<unknown>;
29
- /**
30
- * Add Case Payment Refund. Refunds a payment on the case payment specified by caPaymentId.
31
- *
32
- * @category Case Payment Refunds
33
- * @param {number} caPaymentId - The Case Payment ID for the case payment which to refund
34
- * @param {number} refundAmount - The amount to refund
35
- * @param {string} comment - A comment to append to the refund
36
- * @return {Object} Returns Promise that represents an object describing the newly-added payment refund. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaPaymentRefundItemBase
37
- */
38
- addRefund(caPaymentId: number, refundAmount: number, comment: string): Promise<unknown>;
39
- /**
40
- * Add Case Deposit Payment. Adds a payment to the case deposit specified by CaDepositId.
41
- *
42
- * @category Case Payments
43
- * @param {number} caDepositId - The Case Deposit ID for the case deposit to which to add the fee
44
- * @param {Object} options - See /{subdirectory}/apidocs/#/service-info/Pll/CasePayment for more options, including required fields.
45
- * @return {Object} Returns Promise that represents an object describing the newly-added payment. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaPaymentItemBase
46
- */
47
- addDepositPayment(caDepositId: number, options: Object): Promise<unknown>;
48
- /**
49
- * Adds a deposit to the case specified by the CaObectId.
50
- *
51
- * @category Case Deposits
52
- * @param {number} caObjectId - The Case Object ID for the case to which to add the fee
53
- * @param {number} depositId - The deposit setup id for the deposit to add to the case.
54
- * @param {number} [amount] - The amount of the deposit (optional)
55
- * @param {string} [comment] - Comment text to add to the deposit (optional)
56
- * @return {Object} Returns Promise that represents an object describing the newly-added deposit. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaDepositItemBase
57
- */
58
- addDeposit(caObjectId: number, depositId: number, amount?: number, comment?: string): Promise<unknown>;
59
- /**
60
- * Adds an instrument to the case specified by the CaObectId.
61
- *
62
- * @category Case Instruments
63
- * @param {number} caObjectId - The Case Object ID for the case to which to add the instrument
64
- * @param {number} instTypeId - The instrument type id for the instrument being added to the case.
65
- * @param {number} amount - The amount of the instrument
66
- * @param {Date} dateExpire - The datetime for the instrument to expire.
67
- * @param {Object} [options] - See /{subdirectory}/apidocs/#/service-info/Pll/CaseInstrument for more options.
68
- * @return {Object} Returns Promise that represents an object describing the newly-added instrument. See /{subdirectory}/apidocs/#/service-info/Pll/CaseInstrument
69
- */
70
- addInstrument(caObjectId: number, instTypeId: number, amount: number, dateExpire: Date, options?: Object): Promise<unknown>;
71
- /**
72
- * Updates a fee specified by the CaFeeId.
73
- *
74
- * @category Case Fees
75
- * @param {number} caFeeId - The Fee ID for the specific instance of the fee you wish to update
76
- * @param {Object} [options] - See /{subdirectory}/apidocs/#/service-info/Pll/CaseFees for more options. (Checkboxes -- Autorecalculate -- are Y/N strings)
77
- * @return {Object} Returns Promise that represents an object describing the updated fee. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaFeesItemBase
78
- */
79
- updateFee(caFeeId: number, options?: Object): Promise<unknown>;
80
- /**
81
- * Void a refund.
82
- *
83
- * @category Case Refund Payment
84
- * @param {number} caPaymentRefundId - The Refund ID for the specific refund to void
85
- * @param {String} voided - A string. No clue.
86
- * @return {Object} Returns Promise that represents an object describing the voided refund. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaPaymentRefundItemBase
87
- */
88
- voidRefund(caPaymentRefundId: number, voided: string): Promise<unknown>;
89
- /**
90
- * Adds Default Case Fees. Adds fees to the case specified by the CaObectId and BusCaseId.
91
- *
92
- * @category Case Fees
93
- * @param {number} caObjectId - The Case Object ID for the case to which to add the default fees
94
- * @param {number} busCaseId - The business case ID whose default fees should be added to the case
95
- * @return {Object} Returns Promise that represents a collection of Fee Items. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaFeesItemBase
96
- */
97
- addDefaultFees(caObjectId: number, busCaseId: number): Promise<unknown>;
98
- /**
99
- * Adds Default Case Deposits. Adds deposits to the case specified by the CaObectId and BusCaseId.
100
- *
101
- * @category Case Deposits
102
- * @param {number} caObjectId - The Case Object ID for the case to which to add the default deposits
103
- * @param {number} busCaseId - The business case ID whose default deposits should be added to the case
104
- * @return {Object} Returns Promise that represents a collection of Deposit Items. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaDepositItemBase
105
- */
106
- addDefaultDeposits(caObjectId: number, busCaseId: number): Promise<unknown>;
107
- /**
108
- * Gets the fees from the case specified by the CaObectId.
109
- *
110
- * @category Case Fees
111
- * @param {number} caObjectId - The Case Object ID for the case to which to get the fees
112
- * @return {Object} Returns Promise that represents a collection of Case Fees.
113
- */
114
- getFees(caObjectId: number): Promise<unknown>;
115
- /**
116
- * Get Case Deposit by Case ObjectId.
117
- *
118
- * @category Case Deposits
119
- * @param {number} caObjectId - The Case Object ID for the case to which to get the deposits
120
- * @return {Object} Returns Promise that represents a collection of Case Deposits.
121
- */
122
- getDeposits(caObjectId: number): Promise<unknown>;
123
- /**
124
- * Get Case Payments by Case ObjectId
125
- *
126
- * @category Case Payments
127
- * @param {number} caObjectId - The Case Object ID for the case to which to get the payments
128
- * @return {Object} Returns Promise that represents a collection of Case Payments.
129
- */
130
- getPayments(caObjectId: number): Promise<unknown>;
131
- /**
132
- * Gets the instruments from the case specified by the CaObectId.
133
- *
134
- * @category Case Instruments
135
- * @param {number} caObjectId - The Case Object ID for the case to which to get the fees
136
- * @return {Object} Returns Promise that represents a collection of Case Instruments.
137
- */
138
- getInstruments(caObjectId: number): Promise<unknown>;
139
- /**
140
- * Delete the fee specified by the caFeeId.
141
- *
142
- * @category Case Fees
143
- * @param {number} caFeeId - The Case Fee ID which should be deleted
144
- * @return {Object} Returns Promise that represents a Case Fee object.
145
- */
146
- deleteFee(caFeeId: number): Promise<unknown>;
147
- /**
148
- * Delete Case Fees by Case ObjectId. Delete from the system all Fees linked to a specific Case as specified by the Case Id parameter (CaObjectId).
149
- *
150
- * @category Case Fees
151
- * @param {number} caObjectId - The Case Object ID whose fees should be deleted
152
- * @return {Object} Returns Promise that represents a number (?)
153
- */
154
- deleteFeesByCaseId(caObjectId: number): Promise<unknown>;
155
- /**
156
- * Delete a Case Payment by Id. Delete a specific case payment by CaPaymentId.
157
- *
158
- * @category Case Payments
159
- * @param {number} caPaymentId - The Case Payment ID which should be deleted
160
- * @return {Object} Returns Promise that represents a Case Payment object.
161
- */
162
- deletePayment(caFeeId: number): Promise<unknown>;
163
- /**
164
- * Delete Case Payment Refund. Removes a refund on a payment.
165
- *
166
- * @category Case Payment Refunds
167
- * @param {number} caPaymentRefundId - The Case Payment ID for the case payment which to refund
168
- * @return {Object} Returns Promise that represents an object describing the deleted payment refund. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaPaymentRefundItemBase
169
- */
170
- deleteRefund(caPaymentRefundId: number): Promise<unknown>;
171
- /**
172
- * Delete Case Payments by Case ObjectId. Delete from the system all payments associated to a specific case as specified by the case id (CaObjectId)
173
- *
174
- * @category Case Payments
175
- * @param {number} caObjectId - The Case Object ID whose payments should be deleted
176
- * @return {Object} Returns Promise that represents a number (?)
177
- */
178
- deletePaymentsByCaseId(caObjectId: number): Promise<unknown>;
179
- /**
180
- * Delete the fee specified by the caFeeId.
181
- *
182
- * @category Case Deposits
183
- * @param {number} caDepositId - The Case Deposit ID which should be deleted
184
- * @return {Object} Returns Promise that represents a collection of Case Deposits.
185
- */
186
- deleteDeposit(caDepositId: number): Promise<unknown>;
187
- /**
188
- * Delete Case Fees by Case ObjectId. Delete from the system all Fees linked to a specific Case as specified by the Case Id parameter (CaObjectId).
189
- *
190
- * @category Case Deposits
191
- * @param {number} caObjectId - The Case Object ID whose fees should be deleted
192
- * @return {Object} Returns Promise that represents a number (?)
193
- */
194
- deleteDepositsByCaseId(caObjectId: number): Promise<unknown>;
195
- /**
196
- * Delete the instrument specified by the caInstrumentId.
197
- *
198
- * @category Case Instruments
199
- * @param {number} caInstrumentId - The Case Instrument ID which should be deleted
200
- * @return {Object} Returns Promise that represents a Case Instrument.
201
- */
202
- deleteInstrument(caInstrumentId: number): Promise<unknown>;
203
- /**
204
- * Delete Case Instruments by Case ObjectId. Delete from the system all Instruments linked to a specific Case as specified by the Case Id parameter (CaObjectId).
205
- *
206
- * @category Case Instruments
207
- * @param {number} caObjectId - The Case Object ID whose instruments should be deleted
208
- * @return {Object} Returns Promise that represents a number (?)
209
- */
210
- deleteInstrumentsByCaseId(caObjectId: number): Promise<unknown>;
211
- /**
212
- * Search for Case Fees. Include at least one of the search fields. A logical 'and' operation is applied for multiple search fields.
213
- *
214
- * @category Case Fees
215
- * @param {Object} filters - The parameter(s) to search by
216
- * @return {Object} Returns Promise that represents an Array of case fee IDs
217
- */
218
- searchFees(filters: Object): Promise<unknown>;
219
- /**
220
- * Search for Case Payments. Include one or more of the search fields. A logical 'and' operation is applied for multiple search fields.
221
- *
222
- * @category Case Payments
223
- * @param {Object} filters - The filters to search for matched Case Payments
224
- * @return {Object} Returns Promise that represents an Array of case payment IDs
225
- */
226
- searchPayments(filters: Object): Promise<unknown>;
227
- /**
228
- * Search for Case Payment Refunds. Include one or more of the search fields. A logical 'and' operation is applied for multiple search fields.
229
- *
230
- * @category Case Payment Refunds
231
- * @param {Object} filters - The filters to search for matched Case Payments.
232
- * @return {Object} Returns Promise that represents an Array of case payment refund IDs
233
- */
234
- searchRefunds(filters: Object): Promise<unknown>;
235
- /**
236
- * Search for Case Deposits. Include at least one of the search fields. A logical 'and' operation is applied for multiple search fields.
237
- *
238
- * @category Case Deposits
239
- * @param {Object} filters - The parameters to search by.
240
- * @return {Object} Returns Promise that represents an Array of case fee IDs
241
- */
242
- searchDeposits(filters: Object): Promise<unknown>;
243
- /**
244
- * Get All Fee Templates
245
- *
246
- * @category Case Fees
247
- * @return {Object} Returns Promise that represents an object describing the newly-added fee. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaFeesItemBase
248
- */
249
- getAllFeeTemplates(): Promise<unknown>;
250
- /**
251
- * Search for Fees. Include at least one of the search fields. A logical 'and' operation is applied for multiple search fields.
252
- *
253
- * @category Case Fees
254
- * @param {Object} filters - The parameters to search by
255
- * @return {Object} Returns Promise that represents an Array of case fee IDs
256
- */
257
- searchFeeTemplates(filters: Object): Promise<unknown>;
258
- /**
259
- * Search for Case Instruments. Include at least one of the search fields. A logical 'and' operation is applied for multiple search fields.
260
- *
261
- * @category Case Instruments
262
- * @param {Object} filters - The parameters to search by (AddressLine1, Amount, CaInstrumentId, CityName, CommentText, Company, ContactEmail, ContactName, ContactPhone, CountryCode, InstTypeId, SerialNumber, StateCode, ZipCode)
263
- * @return {Object} Returns Promise that represents an Array of case instrument IDs
264
- */
265
- searchCaseInstruments(filters: Object): Promise<unknown>;
266
- /**
267
- * Get the Defined Instruments
268
- *
269
- * @category Instruments
270
- * @param {Object} options - the options to filter the instruments returned by
271
- * @return {Object} Returns Promise that represents an Array of CaInstrumentItem
272
- */
273
- getInstrumentList(options: Object): Promise<unknown>;
274
- /**
275
- * Adds a release to a case instrument specified by the caInstrumentId. Must provide either amountReleased OR percentReleased
276
- *
277
- * @category Case Instrument Releases
278
- * @param {number} caInstrumentId - The Case Instrument ID to which to add the instrument release
279
- * @param {number} releasedBy - UserID to attach to the release.
280
- * @param {Date} dateReleased - The date of the release
281
- * @param {number} [amountReleased] - The amount to be released
282
- * @param {number} [percentReleased] - OR the percent to be released
283
- * @param {string} [comment] - Comment to attach to the release
284
- * @return {Object} Returns Promise that represents an object describing the newly-added instrument release. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaInstReleasesItemBase
285
- */
286
- addCaseInstrumentRelease(caInstrumentId: number, releasedBy: number, dateReleased: Date, amountReleased?: number, percentReleased?: number, comment?: string): Promise<unknown>;
287
- /**
288
- * Deletes a release specified by the caInstReleasesId.
289
- *
290
- * @category Case Instrument Releases
291
- * @param {number} caInstReleasesId - The Case Instrument Release ID to delete
292
- * @return {Object} Returns Promise that represents an object describing the deleted instrument release. See /{subdirectory}/apidocs/#/data-type-info;dataType=CaInstReleasesItemBase
293
- */
294
- deleteCaseInstrumentRelease(caInstReleasesId: number): Promise<unknown>;
295
- /**
296
- * Search for Case Instrument Releases. Include one or more of the search fields. A logical 'and' operation is applied for muliple search fields.
297
- *
298
- * @category Case Instrument Releases
299
- * @param {Object} filters - Specify at least one of the following: AmountReleased, CaInstReleasesId, CaInstrumentId, CommentText, PercentReleased, ReleasedBy
300
- * @return {Object} Returns Promise that represents an Array of Case Instruments resulting from the search
301
- */
302
- searchCaseInstrumentReleases(filters: Object): Promise<unknown>;
303
- /**
304
- * Get All Fees
305
- *
306
- * @category Fees
307
- * @return {Object} Returns Promise that represents a collection of FeeSetups. See /{subdirectory}/apidocs/#/data-type-info;dataType=FeeSetupItemBase
308
- */
309
- fees(): Promise<unknown>;
310
- /**
311
- * Search for Fees. Include one or more of the search fields. A logical 'and' operation is applied for muliple search fields.
312
- *
313
- * @category Fees
314
- * @param {Object} filters - Specify at least one.
315
- * @return {Object} Returns Promise that represents a collection of FeeSetups. See /{subdirectory}/apidocs/#/data-type-info;dataType=FeeSetupItemBase
316
- */
317
- searchAvailableFees(filters: {
318
- AccountCode?: string;
319
- FeeCode?: string;
320
- FeeDesc?: string;
321
- FeeSetupId?: number;
322
- FeeTypeId?: number;
323
- }): Promise<unknown>;
324
- /**
325
- * Get all tender types configured
326
- *
327
- * @category Tender Types
328
- * @return {Object} Returns Promise that represents a collection of tender type objects. See /{subdirectory}/apidocs/#/data-type-info;dataType=TenderTypeItem
329
- */
330
- getTenderTypes(): Promise<unknown>;
331
- /**
332
- * Adds a tender type configuration
333
- *
334
- * @category Tender Types
335
- * @param {Object} options - See /{subdirectory}/apidocs/#/service-info/Pll/TenderType
336
- * @return {Object} Returns Promise that represents an object describing the newly-added tender type. See /{subdirectory}/apidocs/#/data-type-info;dataType=TenderTypeItem
337
- */
338
- addTenderType(options: Object): Promise<unknown>;
339
- /**
340
- * Update a tender type configuration
341
- *
342
- * @category Tender Types
343
- * @param {number} tenderTypeId - ID of the tender type to update
344
- * @param {Object} options - See /{subdirectory}/apidocs/#/service-info/Pll/TenderType
345
- * @return {Object} Returns Promise that represents an object describing the newly-added tender type. See /{subdirectory}/apidocs/#/data-type-info;dataType=TenderTypeItem
346
- */
347
- updateTenderType(tenderTypeId: number, options: Object): Promise<unknown>;
348
- }
@@ -1,187 +0,0 @@
1
- export declare class CaseWorkflow {
2
- /**
3
- * @hidden
4
- */
5
- cw: any;
6
- /**
7
- * Task sub-methods
8
- */
9
- task: Object;
10
- /**
11
- * @hidden
12
- */
13
- constructor(cw: any);
14
- /**
15
- * Adds a task to the case specified by the CaObectId.
16
- *
17
- * @category Tasks
18
- * @param {number} caObjectId - The Case Object to attach the task to
19
- * @param {number} taskId - The task ID to add to the case workflow
20
- * @param {number} startPoint - The start point in the workflow for the task
21
- * @param {number} endPoint - The end point in the workflow for the task
22
- * @param {Object} [options] - Options for the Task. See /{subdirectory}/apidocs/#/service-info/Pll/CaseTask
23
- * @return {Object} Returns Promise that represents an object describing CaTaskItemBase.
24
- */
25
- addTask(caObjectId: number, taskId: number, startPoint: number, endPoint: number, options?: Object): Promise<unknown>;
26
- /**
27
- * Add Task Result
28
- *
29
- * @category Task Results
30
- * @param {number} caObjectId - The Case Object to attach the task to
31
- * @param {number} caTaskId - The Case task ID to add the result to
32
- * @param {number} resultCode - The result Code
33
- * @param {number} resultID - The result ID
34
- * @param {number} resultSetID - The result set ID
35
- * @param {Object} [options] - Options for the Task. See /{subdirectory}/apidocs/#/service-info/Pll/CaseTaskResults
36
- * @return {Object} Returns Promise that represents an object describing CaTaskResultsItem.
37
- */
38
- addTaskResult(caObjectId: number, caTaskId: number, resultCode: number, resultID: number, resultSetID: number, options?: Object): Promise<unknown>;
39
- /**
40
- * Add Task Comment
41
- *
42
- * @category Comments
43
- * @param {number} caTaskId - The Case task ID of the task to add the comment to
44
- * @param {string} comment - The comment text
45
- * @return {Object} Returns Promise that represents an object describing CaTaskCommentsItemBase.
46
- */
47
- addTaskComment(caTaskId: number, comment: string): Promise<unknown>;
48
- /**
49
- * Get tasks by CaObjectId
50
- *
51
- * @category Tasks
52
- * @param {number} caObjectId - The Case Object to get the attached tasks
53
- * @param {boolean} checkRelatedItems - Wherther to check related items. Defaults to false.
54
- * @return {Object} Returns Promise that represents a collection of the CaTaskItemBases.
55
- */
56
- getTasksByCaseId(caObjectId: number, checkRelatedItems?: boolean): Promise<unknown>;
57
- /**
58
- * Get tasks by TaskIds
59
- *
60
- * @category Tasks
61
- * @param {Array<number>} caTaskIds - The IDs of the tasks to retrieve
62
- * @param {boolean} checkRelatedItems - Wherther to check related items. Defaults to false.
63
- * @return {Object} Returns Promise that represents a collection of the CaTaskItemBases.
64
- */
65
- getTasksById(caTaskIds: Array<number>, checkRelatedItems?: boolean): Promise<unknown>;
66
- /**
67
- * Get CaTaskResultsItem by CaTaskIds
68
- *
69
- * @category Task Results
70
- * @param {Array<number>} caTaskIds - The IDs of the tasks for which to retrieve results
71
- * @return {Object} Returns Promise that represents a collection of CaTaskResultsItems.
72
- */
73
- getResultsByTaskId(caTaskIds: Array<number>): Promise<unknown>;
74
- /**
75
- * Search for CaseTaskComments by CaTaskId
76
- *
77
- * @category Comments
78
- * @param {number} caTaskId - The task ID for which to retrieve attached comments
79
- * @return {Object} Returns Promise that represents a collection of CommentRecords.
80
- */
81
- getCommentsForTask(caTaskId: number): Promise<unknown>;
82
- /**
83
- * Search for CaseTaskComments by CaTaskId
84
- *
85
- * @category Comments
86
- * @param {Array<number>} caTaskIds - The task IDs for which to retrieve attached comments
87
- * @return {Object} Returns Promise that represents a collection of CaTaskCommentsItemBase.
88
- */
89
- getCommentsForTasks(caTaskIds: Array<number>): Promise<unknown>;
90
- /**
91
- * Updates a task
92
- *
93
- * @category Tasks
94
- * @param {number} caTaskId - The Case Object to attach the task to
95
- * @param {Object} [options] - Options for Task. See /{subdirectory}/apidocs/#/service-info/Pll/CaseTask
96
- * @return {Object} Returns Promise that represents an object describing CaTaskItemBase.
97
- */
98
- updateTask(caTaskId: number, options?: Object): Promise<unknown>;
99
- /**
100
- * Update Task Comment
101
- *
102
- * @category Comments
103
- * @param {number} caTaskCommentId - The Case task ID of the task to add the comment to
104
- * @param {string} comment - The comment text
105
- * @param {number} commentId - Probably unnecessary?
106
- * @return {Object} Returns Promise that represents an object describing CaTaskCommentsItemBase.
107
- */
108
- updateTaskComment(caTaskCommentId: number, comment: string, commentId?: number): Promise<unknown>;
109
- /**
110
- * Updates a task
111
- *
112
- * @category Tasks
113
- * @param {number} caTaskId - The Case Object to attach the task to
114
- * @param {string} resultCode - The result code to set for the specified Task
115
- * @param {Object} [options] - Options for Task. Specify either or both TaskCompletedBy & TaskCompleteDate. See /{subdirectory}/apidocs/#/service-info/Pll/CaseTask
116
- * @return {Object} Returns Promise that represents an object describing CaTaskItemBase.
117
- */
118
- setTaskResult(caTaskId: number, resultCode: string, options?: Object): Promise<unknown>;
119
- /**
120
- * Deletes a task by TaskID
121
- *
122
- * @category Tasks
123
- * @param {number} caTaskId - The caTaskId for the task which should be deleted
124
- * @return {Object} Returns Promise that represents an object describing CaTaskItemBase.
125
- */
126
- deleteTask(caTaskId: number): Promise<unknown>;
127
- /**
128
- * Deletes a task by TaskID
129
- *
130
- * @category Tasks
131
- * @param {number} caTaskId - The caTaskId for the task which should be deleted
132
- * @return {Object} Returns Promise that represents the number of the CaObjectID
133
- */
134
- deleteTasksOnCase(caObjectId: number): Promise<unknown>;
135
- /**
136
- * Deletes tasks by TaskID
137
- *
138
- * @category Comments
139
- * @param {Array<number>} caTaskCommentIds - The comments to delete
140
- * @return {Object} Returns Promise that represents a dictionary of comment IDs.
141
- */
142
- deleteTaskComments(caTaskCommentIds: Array<number>): Promise<unknown>;
143
- /**
144
- * Search for Case Tasks. Include one or more of the search fields. A logical 'and' operation is applied to muliple search fields
145
- *
146
- * @category Tasks
147
- * @param {Object} filters - The parameters to search by. (ResponsibleUserId, TaskAvailable, TaskComplete, TaskType)
148
- * @return {Object} Returns Promise that represents a collection of resulting CaTaskIDs
149
- */
150
- searchForTasks(filters?: Object): Promise<unknown>;
151
- /**
152
- * Search for CaseTaskResults Objects. Include one or more of the search fields. A logical 'and' operation is applied to muliple search fields
153
- *
154
- * @category Task Results
155
- * @param {Object} filters - The parameters to search by. See: /{subdirectory}/apidocs/#/service-info/Pll/CaseTaskResults
156
- * @return {Object} Returns Promise that represents a collection of resulting CaTaskResultsItem
157
- */
158
- searchForTaskResults(filters?: Object): Promise<unknown>;
159
- /**
160
- * Adds a task to the case specified by the CaObectId.
161
- *
162
- * @category Task Attachments
163
- * @param {number} caTaskId - The Task ID to attach the document to
164
- * @param {number} caObjectId - The Case Object ID
165
- * @param {string} docName - The file name as it should display in the system
166
- * @param {string} locationType - The location of the file...leave blank
167
- * @param {any} file - The binary string for the file
168
- * @return {Object} Returns Promise that represents an object describing added Attachment
169
- */
170
- addTaskAttachment(caTaskId: number, caObjectId: number, docName: number, file: any, locationType?: string): Promise<unknown>;
171
- /**
172
- * Gets each Document Attached to the specified Task
173
- *
174
- * @category Task Attachments
175
- * @param {number} caTaskId - The Task ID to attach the document to
176
- * @return {Object} Returns Promise that represents a collection of objects describing each Attachment on the provided task
177
- */
178
- getTaskAttachments(caTaskId: number): Promise<unknown>;
179
- /**
180
- * Deletes a task attachment by caRelDocId (Related Case Document ID). Same as RelDocs delete for case.
181
- *
182
- * @category Task Attachments
183
- * @param {number} caRelDocId - The caRelDocId for the related document which should be deleted
184
- * @return {Object} Returns Promise that represents the an object describing the deleted document.
185
- */
186
- deleteTaskAttachment(caRelDocId: number): Promise<unknown>;
187
- }
@@ -1,53 +0,0 @@
1
- import ReversibleMap from 'reversible-map';
2
- /**
3
- * A plugin that contains "comments" methods
4
- */
5
- export declare class Comments {
6
- /**
7
- * @hidden
8
- */
9
- cw: any;
10
- /**
11
- * Storage of all potential activity types which comments can be attached to: Unknown, Request, WorkOrder, CaTask, CaObject, CaCorrection, Project, Contract
12
- */
13
- activityTypes: ReversibleMap<string, number>;
14
- /**
15
- * Storage of object's active activityType
16
- */
17
- currentActivityType: string;
18
- /**
19
- * @hidden
20
- */
21
- constructor(cw: any, activityType: string);
22
- /**
23
- * Add a comment - for adding a comment to an object when the object is already known. Always call comment.add from request, case, workorder, or inspection.
24
- *
25
- * @param {number} sid - The SID of the activity to which the comment should be attached
26
- * @param {string} comment - The text for the comment
27
- * @return {Object} Returns a Promise which represents a CommentRecord object
28
- */
29
- add(sid: number, comment: string): Promise<unknown>;
30
- /**
31
- * Update a comment
32
- *
33
- * @param {number} id - The ID of the comment which should be updated
34
- * @param {string} comment - The new text for the updated comment
35
- * @return {Object} Returns a Promise which represents a CommentRecord object
36
- */
37
- update(id: number, comment: string): Promise<unknown>;
38
- /**
39
- * Get comments for activity items
40
- *
41
- * @param {Array<number>} sids - The options SIDs to get comments for.
42
- * @return {Object} Returns Promise object that represents a collection of available comments
43
- */
44
- get(sids: Array<number>): Promise<unknown>;
45
- /**
46
- * Get pre-defined comments for activityTypes
47
- *
48
- * @param {number} problemSid - The ProblemSid if currentActivityType is (Service) Request
49
- * @param {string} [category] - Only applies to WorkOrder and ServiceRequest category comments.
50
- * @return {Object} Returns Promise object that represents a collection of available comment templates.
51
- */
52
- getPredefined(problemSid?: number, category?: string): Promise<unknown>;
53
- }
package/dist/error.d.ts DELETED
@@ -1,57 +0,0 @@
1
- export interface CWErrorMsgs {
2
- MessageType: number;
3
- Code: number;
4
- Service: string;
5
- Name: string;
6
- DebugDetails: string;
7
- DisplayText: string;
8
- InnerMessage: string | null;
9
- }
10
- /**
11
- * CWErrorInt interface definition for implementation by CWError
12
- *
13
- * `{name: string, code: number, message: string, info?: string}`
14
- *
15
- */
16
- export interface CWErrorInt {
17
- name: string;
18
- code: number;
19
- message: string;
20
- error_messages?: Array<CWErrorMsgs>;
21
- info?: string;
22
- }
23
- /**
24
- * CWError implements a custom error class for this codebase with additional information
25
- *
26
- */
27
- export declare class CWError implements CWErrorInt {
28
- /**
29
- * Just statically set to "Cityworks Exception" for now
30
- */
31
- name: string;
32
- /**
33
- * Number for the thrown error (Efforts were made to make these unique when thrown throughout the codebase)
34
- */
35
- code: number;
36
- /**
37
- * The error message
38
- */
39
- message: string;
40
- /**
41
- * The error message
42
- */
43
- error_messages: Array<CWErrorMsgs>;
44
- /**
45
- * Object stuffed with any other information one wishes to include in the thrown error
46
- */
47
- info?: string;
48
- /**
49
- * CWError implements a custom error class for this codebase with additional information
50
- *
51
- * @param {number} code - Number for the thrown error (Efforts were made to make these unique when thrown throughout the codebase)
52
- * @param {string} message - The error message
53
- * @param {Object} info - Object stuffed with any other information one wishes to include in the thrown error
54
- * @return {Object} Returns instance of CWError object
55
- */
56
- constructor(code: number, message: string, info?: any);
57
- }