cityworks 2.1.4 → 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.
@@ -45,12 +45,14 @@ export declare class Attachments {
45
45
  */
46
46
  delete(attachmentIds: Array<number> | number): Promise<unknown>;
47
47
  /**
48
- * Get attachment URLs in array
49
- *
50
- * @category Attachments
51
- * @return {Object} Returns array of attachment URLs
48
+ * @hidden
52
49
  */
53
- static downloadUrls(): string[];
50
+ static downloadUrls(): {
51
+ case: string;
52
+ inspection: string;
53
+ request: string;
54
+ workorder: string;
55
+ };
54
56
  /**
55
57
  * Download an attachment
56
58
  *
@@ -89,6 +89,10 @@ export declare class Briefcase {
89
89
  * Asset (Address) methods
90
90
  */
91
91
  asset?: any;
92
+ /**
93
+ * Flag methods
94
+ */
95
+ flag?: any;
92
96
  /**
93
97
  * Asset (Address) methods
94
98
  */
@@ -11,7 +11,7 @@ export declare class CaseAssets {
11
11
  * Attach asset to case
12
12
  *
13
13
  * @category Case Assets
14
- * @param {number} caObjectId - The Case Object to attach the data group to.
14
+ * @param {number} caObjectId - The Case Object to attach the asset to.
15
15
  * @param {boolean} updateXY - Whether or not to update the Case's X/Y values when attaching the asset. Defaults to true.
16
16
  * @param {Object} [options] - Options for CaseDataGroup including Address, AddressId, AssetId, AssetObjectId, AssetType, CityName, CrossStreet, DateExpired, ExpiredFlag, Facility_Id, FeatureAssetId, FeatureClass, FeatureObjectId, LegacyId, Level_Id, LndObjectId, Location, MasterFlag, ObjectId, StateCode, StreetDirection, StreetFraction, StreetName, StreetNumber, StreetPostDir, StreetType, Suite, TileNo, UpdateCaseData, XCoord, YCoord, ZCoord, and ZipCode
17
17
  * @return {Object} Returns Promise that represents an object describing CaAddress.
@@ -0,0 +1,60 @@
1
+ export declare class CaseFlags {
2
+ /**
3
+ * @hidden
4
+ */
5
+ cw: any;
6
+ /**
7
+ * @hidden
8
+ */
9
+ constructor(cw: any);
10
+ /**
11
+ * Add flag to case
12
+ *
13
+ * @category Case Flags
14
+ * @param {number} caObjectId - The Case Object to add the flag to.
15
+ * @param {number} flagId - The flag ID
16
+ * @param {string} severity - The severity of the flag
17
+ * @param {number} appliedBy - Which userID is applying the flag
18
+ * @param {DateTime} DateApplied - The date that the flag should be applied
19
+ * @param {Object} [options] - Options for CaseFlags includes Notes, DisciplineId, CompletedBy, DateCompleted
20
+ * @return {Object} Returns Promise that represents an object describing CaFlag.
21
+ */
22
+ add(caObjectId: number, flagId: number, severity: string, appliedBy: number, DateApplied: Date, options?: {
23
+ Notes?: string;
24
+ DisciplineId?: number;
25
+ CompletedBy?: number;
26
+ DateCompleted?: Date;
27
+ }): Promise<unknown>;
28
+ /**
29
+ * Delete specific flag from case
30
+ *
31
+ * @category Case Flags
32
+ * @param {number} caFlagId - The CaFlagId (case flag instance ID) that should be deleted
33
+ * @return {Object} Returns Promise that represents the CaFlag that has been deleted.
34
+ */
35
+ delete(caFlagId: number): Promise<unknown>;
36
+ /**
37
+ * Delete all flags from case
38
+ *
39
+ * @category Case Flags
40
+ * @param {number} caObjectId - The Case Object to delete the flags from.
41
+ * @return {Object} Returns Promise that represents the number of flags deleted from the case provided.
42
+ */
43
+ deleteAll(caObjectId: number): Promise<unknown>;
44
+ /**
45
+ * Get flags attached to a specific case
46
+ *
47
+ * @category Case Flags
48
+ * @param {number} caObjectId - The Case Object from which to get attached flags
49
+ * @return {Object} Returns Promise that represents a collection of the default CaFlags.
50
+ */
51
+ getForCase(caObjectId: number): Promise<unknown>;
52
+ /**
53
+ * Search for Case Flags. Include one or more of the search fields. A logical 'and' operation is applied to muliple search fields
54
+ *
55
+ * @category Case Flags
56
+ * @param {Object} filters - The parameters to search by. (CaFlagId, Flag, FlagDesc)
57
+ * @return {Object} Returns Promise that represents an Array of resulting Flags
58
+ */
59
+ search(filters?: Object): Promise<unknown>;
60
+ }
package/dist/error.d.ts CHANGED
@@ -14,11 +14,11 @@ export interface CWErrorMsgs {
14
14
  *
15
15
  */
16
16
  export interface CWErrorInt {
17
- name: string;
18
- code: number;
19
- message: string;
20
- error_messages?: Array<CWErrorMsgs>;
21
- info?: string;
17
+ Name: string;
18
+ Code: number;
19
+ Message: string;
20
+ Error_messages?: Array<CWErrorMsgs>;
21
+ Info?: string;
22
22
  }
23
23
  /**
24
24
  * CWError implements a custom error class for this codebase with additional information
@@ -28,23 +28,23 @@ export declare class CWError implements CWErrorInt {
28
28
  /**
29
29
  * Just statically set to "Cityworks Exception" for now
30
30
  */
31
- name: string;
31
+ Name: string;
32
32
  /**
33
33
  * Number for the thrown error (Efforts were made to make these unique when thrown throughout the codebase)
34
34
  */
35
- code: number;
35
+ Code: number;
36
36
  /**
37
37
  * The error message
38
38
  */
39
- message: string;
39
+ Message: string;
40
40
  /**
41
41
  * The error message
42
42
  */
43
- error_messages: Array<CWErrorMsgs>;
43
+ Error_messages: Array<CWErrorMsgs>;
44
44
  /**
45
45
  * Object stuffed with any other information one wishes to include in the thrown error
46
46
  */
47
- info?: string;
47
+ Info?: string;
48
48
  /**
49
49
  * CWError implements a custom error class for this codebase with additional information
50
50
  *
package/dist/index.d.ts CHANGED
@@ -222,10 +222,10 @@ declare const activity_link: ActivityLinks;
222
222
  declare const message_queue: MessageQueue;
223
223
  declare const search: Search;
224
224
  declare const query: Query;
225
- declare const report: Report;
226
225
  declare const gis: Gis;
227
226
  declare const request: Request;
228
227
  declare const inspection: Inspection;
229
228
  declare const workorder: WorkOrder;
230
229
  declare const briefcase: Briefcase;
230
+ declare const report: Report;
231
231
  export { cw as Cityworks, general, activity_link, message_queue, search, query, gis, request, inspection, workorder, briefcase, report };