@trakit/objects 0.0.1

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.
Files changed (219) hide show
  1. package/API/Arrays.d.ts +46 -0
  2. package/API/Base.d.ts +18 -0
  3. package/API/BaseComponent.d.ts +37 -0
  4. package/API/BaseCompound.d.ts +19 -0
  5. package/API/Codifier.d.ts +5 -0
  6. package/API/Component.d.ts +42 -0
  7. package/API/Compound.d.ts +19 -0
  8. package/API/Constants.d.ts +39 -0
  9. package/API/Conversion.d.ts +255 -0
  10. package/API/Files.d.ts +21 -0
  11. package/API/Functions.d.ts +191 -0
  12. package/API/Geography/Functions.d.ts +232 -0
  13. package/API/Geography/Interfaces.d.ts +145 -0
  14. package/API/Geography/LatLng.d.ts +78 -0
  15. package/API/Geography/LatLngBounds.d.ts +145 -0
  16. package/API/Geography/Position.d.ts +62 -0
  17. package/API/Geography/StreetAddress.d.ts +58 -0
  18. package/API/Geometry/Functions.d.ts +114 -0
  19. package/API/Geometry/Interfaces.d.ts +111 -0
  20. package/API/Geometry/Point.d.ts +80 -0
  21. package/API/Geometry/Radial.d.ts +109 -0
  22. package/API/Geometry/Rectangle.d.ts +163 -0
  23. package/API/Geometry/Size.d.ts +52 -0
  24. package/API/Guid.d.ts +4 -0
  25. package/API/Interfaces/IAmCompany.d.ts +11 -0
  26. package/API/Interfaces/IBelongAsset.d.ts +15 -0
  27. package/API/Interfaces/IBelongBillingProfile.d.ts +15 -0
  28. package/API/Interfaces/IBelongCompany.d.ts +15 -0
  29. package/API/Interfaces/IDeserializable.d.ts +12 -0
  30. package/API/Interfaces/IEnabled.d.ts +10 -0
  31. package/API/Interfaces/IFileSize.d.ts +9 -0
  32. package/API/Interfaces/IGlobal.d.ts +11 -0
  33. package/API/Interfaces/IHavePermissions.d.ts +20 -0
  34. package/API/Interfaces/IHavePreferences.d.ts +29 -0
  35. package/API/Interfaces/IIconic.d.ts +15 -0
  36. package/API/Interfaces/IIdUlong.d.ts +10 -0
  37. package/API/Interfaces/ILabelled.d.ts +9 -0
  38. package/API/Interfaces/INamed.d.ts +13 -0
  39. package/API/Interfaces/IPictured.d.ts +15 -0
  40. package/API/Interfaces/IRequestable.d.ts +18 -0
  41. package/API/Interfaces/ISerializable.d.ts +10 -0
  42. package/API/Interfaces/ISuspendable.d.ts +16 -0
  43. package/API/Interfaces/IVisual.d.ts +18 -0
  44. package/API/Maps.d.ts +28 -0
  45. package/API/Objects.d.ts +33 -0
  46. package/API/SearchPattern.d.ts +45 -0
  47. package/API/TimeSpan.d.ts +140 -0
  48. package/API/Timezone.d.ts +44 -0
  49. package/API/Timezones.d.ts +7 -0
  50. package/API/Types.d.ts +114 -0
  51. package/Accounts/Contact.d.ts +140 -0
  52. package/Accounts/Machine.d.ts +131 -0
  53. package/Accounts/NotificationMethod.d.ts +17 -0
  54. package/Accounts/Permissions/Authorizer.d.ts +204 -0
  55. package/Accounts/Permissions/Permission.d.ts +57 -0
  56. package/Accounts/Permissions/PermissionEscalation.d.ts +33 -0
  57. package/Accounts/Permissions/PermissionEscalationState.d.ts +17 -0
  58. package/Accounts/Permissions/PermissionEscalationType.d.ts +13 -0
  59. package/Accounts/Permissions/PermissionLevel.d.ts +17 -0
  60. package/Accounts/Permissions/PermissionMethod.d.ts +13 -0
  61. package/Accounts/Permissions/PermissionType.d.ts +280 -0
  62. package/Accounts/Session.d.ts +92 -0
  63. package/Accounts/SessionStatus.d.ts +29 -0
  64. package/Accounts/SystemsOfUnits.d.ts +13 -0
  65. package/Accounts/User.d.ts +147 -0
  66. package/Accounts/UserAdvanced.d.ts +54 -0
  67. package/Accounts/UserGeneral.d.ts +100 -0
  68. package/Accounts/UserGroup.d.ts +52 -0
  69. package/Accounts/UserNotifications.d.ts +76 -0
  70. package/Assets/Asset.d.ts +192 -0
  71. package/Assets/AssetAdvanced.d.ts +90 -0
  72. package/Assets/AssetAttribute.d.ts +71 -0
  73. package/Assets/AssetDispatch.d.ts +63 -0
  74. package/Assets/AssetGeneral.d.ts +109 -0
  75. package/Assets/AssetPlaceStatus.d.ts +31 -0
  76. package/Assets/AssetPlaceStatusType.d.ts +17 -0
  77. package/Assets/AssetType.d.ts +21 -0
  78. package/Assets/Person.d.ts +25 -0
  79. package/Assets/PersonGeneral.d.ts +35 -0
  80. package/Assets/Trailer.d.ts +42 -0
  81. package/Assets/TrailerGeneral.d.ts +47 -0
  82. package/Assets/Vehicle.d.ts +73 -0
  83. package/Assets/VehicleAdvanced.d.ts +25 -0
  84. package/Assets/VehicleGeneral.d.ts +33 -0
  85. package/Behaviours/Behaviour.d.ts +79 -0
  86. package/Behaviours/BehaviourLog.d.ts +97 -0
  87. package/Behaviours/BehaviourLogType.d.ts +21 -0
  88. package/Behaviours/BehaviourParameter.d.ts +37 -0
  89. package/Behaviours/BehaviourParameterType.d.ts +21 -0
  90. package/Behaviours/BehaviourScript.d.ts +84 -0
  91. package/Billing/BillableBase.d.ts +85 -0
  92. package/Billing/BillableSmsProfile.d.ts +26 -0
  93. package/Billing/BillingCurrency.d.ts +17 -0
  94. package/Billing/BillingCycle.d.ts +17 -0
  95. package/Billing/BillingProfile.d.ts +107 -0
  96. package/Billing/Hosting/BillableHostingBase.d.ts +41 -0
  97. package/Billing/Hosting/BillableHostingDiscount.d.ts +35 -0
  98. package/Billing/Hosting/BillableHostingLicense.d.ts +29 -0
  99. package/Billing/Hosting/BillableHostingLicenseType.d.ts +20 -0
  100. package/Billing/Hosting/BillableHostingRule.d.ts +29 -0
  101. package/Billing/Hosting/BillableHostingType.d.ts +41 -0
  102. package/Billing/Report/BillingReport.d.ts +114 -0
  103. package/Billing/Report/BillingReportBreakdown.d.ts +35 -0
  104. package/Billing/Report/BillingReportHostingSummary.d.ts +36 -0
  105. package/Billing/Report/BillingReportLicenseBreakdown.d.ts +80 -0
  106. package/Billing/Report/BillingReportServiceBreakdown.d.ts +126 -0
  107. package/Billing/Report/BillingReportStatus.d.ts +25 -0
  108. package/Billing/Report/BillingReportSummary.d.ts +51 -0
  109. package/Companies/ColourStyle.d.ts +25 -0
  110. package/Companies/Company.d.ts +150 -0
  111. package/Companies/CompanyDirectory.d.ts +49 -0
  112. package/Companies/CompanyGeneral.d.ts +51 -0
  113. package/Companies/CompanyPolicies.d.ts +62 -0
  114. package/Companies/CompanyReseller.d.ts +163 -0
  115. package/Companies/CompanyStyles.d.ts +46 -0
  116. package/Companies/LabelStyle.d.ts +46 -0
  117. package/Companies/NotificationServerEmail.d.ts +99 -0
  118. package/Companies/NotificationServerSms.d.ts +25 -0
  119. package/Companies/PasswordExpiryMode.d.ts +17 -0
  120. package/Companies/PasswordPolicy.d.ts +51 -0
  121. package/Companies/SessionMultiUser.d.ts +17 -0
  122. package/Companies/SessionPolicy.d.ts +47 -0
  123. package/Dispatch/DispatchDirection.d.ts +53 -0
  124. package/Dispatch/DispatchJob.d.ts +109 -0
  125. package/Dispatch/DispatchJobPriority.d.ts +25 -0
  126. package/Dispatch/DispatchStep.d.ts +99 -0
  127. package/Dispatch/DispatchStepState.d.ts +27 -0
  128. package/Dispatch/DispatchStepStatus.d.ts +21 -0
  129. package/Dispatch/DispatchTask.d.ts +156 -0
  130. package/Dispatch/DispatchTaskStatus.d.ts +50 -0
  131. package/Hosting/Document.d.ts +71 -0
  132. package/Hosting/Fields/FormFieldAttachments.d.ts +38 -0
  133. package/Hosting/Fields/FormFieldBase.d.ts +71 -0
  134. package/Hosting/Fields/FormFieldBoolean.d.ts +46 -0
  135. package/Hosting/Fields/FormFieldChoice.d.ts +48 -0
  136. package/Hosting/Fields/FormFieldDate.d.ts +33 -0
  137. package/Hosting/Fields/FormFieldNumeric.d.ts +61 -0
  138. package/Hosting/Fields/FormFieldNumericSize.d.ts +32 -0
  139. package/Hosting/Fields/FormFieldSignature.d.ts +17 -0
  140. package/Hosting/Fields/FormFieldText.d.ts +39 -0
  141. package/Hosting/Fields/FormFieldTime.d.ts +34 -0
  142. package/Hosting/Fields/FormFieldTimezone.d.ts +14 -0
  143. package/Hosting/FormFieldType.d.ts +127 -0
  144. package/Hosting/FormResult.d.ts +97 -0
  145. package/Hosting/FormTemplate.d.ts +81 -0
  146. package/Images/Dashcam.d.ts +70 -0
  147. package/Images/DashcamBase.d.ts +98 -0
  148. package/Images/DashcamLive.d.ts +43 -0
  149. package/Images/DashcamMediaType.d.ts +17 -0
  150. package/Images/Icon.d.ts +87 -0
  151. package/Images/IconGlyph.d.ts +54 -0
  152. package/Images/IconLabel.d.ts +32 -0
  153. package/Images/IconLayer.d.ts +33 -0
  154. package/Images/Picture.d.ts +73 -0
  155. package/Maintenance/MaintenanceInterval.d.ts +49 -0
  156. package/Maintenance/MaintenanceJob.d.ts +137 -0
  157. package/Maintenance/MaintenanceJobStatus.d.ts +21 -0
  158. package/Maintenance/MaintenanceSchedule.d.ts +119 -0
  159. package/Messaging/AlertPriority.d.ts +17 -0
  160. package/Messaging/AssetAlert.d.ts +28 -0
  161. package/Messaging/AssetMessage.d.ts +40 -0
  162. package/Messaging/MessageBase.d.ts +101 -0
  163. package/Messaging/MessageFolder.d.ts +13 -0
  164. package/Messaging/MessageStatus.d.ts +29 -0
  165. package/Messaging/MessageType.d.ts +33 -0
  166. package/Places/Place.d.ts +116 -0
  167. package/Places/PlaceType.d.ts +25 -0
  168. package/Providers/Config/ProviderConfig.d.ts +72 -0
  169. package/Providers/Config/ProviderRegistration.d.ts +123 -0
  170. package/Providers/Config/ProviderScript.d.ts +87 -0
  171. package/Providers/Config/ProviderScriptBlock.d.ts +40 -0
  172. package/Providers/Config/ProviderScriptParameter.d.ts +49 -0
  173. package/Providers/Config/ProviderScriptParameterType.d.ts +17 -0
  174. package/Providers/Configuration/ProviderConfiguration.d.ts +68 -0
  175. package/Providers/Configuration/ProviderConfigurationNode.d.ts +65 -0
  176. package/Providers/Configuration/ProviderConfigurationType.d.ts +62 -0
  177. package/Providers/Configuration/ProviderGeofenceBase.d.ts +31 -0
  178. package/Providers/Configuration/ProviderGeofenceCircular.d.ts +28 -0
  179. package/Providers/Configuration/ProviderGeofencePoint.d.ts +12 -0
  180. package/Providers/Configuration/ProviderGeofencePolygon.d.ts +23 -0
  181. package/Providers/Configuration/ProviderGeofenceRectangle.d.ts +28 -0
  182. package/Providers/Provider.d.ts +145 -0
  183. package/Providers/ProviderAdvanced.d.ts +51 -0
  184. package/Providers/ProviderCommand.d.ts +36 -0
  185. package/Providers/ProviderCommandStatus.d.ts +29 -0
  186. package/Providers/ProviderCommandType.d.ts +37 -0
  187. package/Providers/ProviderControl.d.ts +42 -0
  188. package/Providers/ProviderData.d.ts +30 -0
  189. package/Providers/ProviderGeneral.d.ts +117 -0
  190. package/Providers/ProviderType.d.ts +106 -0
  191. package/README.md +13 -0
  192. package/Reports/ReportBreakdown.d.ts +72 -0
  193. package/Reports/ReportBreakdownJob.d.ts +62 -0
  194. package/Reports/ReportBreakdownMessage.d.ts +65 -0
  195. package/Reports/ReportBreakdownTask.d.ts +71 -0
  196. package/Reports/ReportDataTotal.d.ts +50 -0
  197. package/Reports/ReportFilterMode.d.ts +17 -0
  198. package/Reports/ReportNotifications.d.ts +31 -0
  199. package/Reports/ReportOptions.d.ts +51 -0
  200. package/Reports/ReportParameter.d.ts +25 -0
  201. package/Reports/ReportParameterType.d.ts +59 -0
  202. package/Reports/ReportRecurrence.d.ts +54 -0
  203. package/Reports/ReportRecurrenceType.d.ts +34 -0
  204. package/Reports/ReportResult.d.ts +170 -0
  205. package/Reports/ReportResultData.d.ts +17 -0
  206. package/Reports/ReportSchedule.d.ts +112 -0
  207. package/Reports/ReportScorecard.d.ts +39 -0
  208. package/Reports/ReportScorecardParameter.d.ts +31 -0
  209. package/Reports/ReportScorecardRules.d.ts +26 -0
  210. package/Reports/ReportStatus.d.ts +29 -0
  211. package/Reports/ReportSummary.d.ts +119 -0
  212. package/Reports/ReportSummaryReason.d.ts +27 -0
  213. package/Reports/ReportTemplate.d.ts +82 -0
  214. package/Reports/ReportTotal.d.ts +48 -0
  215. package/Reports/ReportType.d.ts +42 -0
  216. package/Storage.d.ts +166 -0
  217. package/objects.d.ts +534 -0
  218. package/objects.min.js +7 -0
  219. package/package.json +22 -0
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A value assigned to {@link DispatchJob}s in order to weigh them when optimizing a route.
3
+ */
4
+ export declare enum DispatchJobPriority {
5
+ /**
6
+ * Will be done last, after all others, if at all.
7
+ */
8
+ standby = "standby",
9
+ /**
10
+ * Low priority jobs are assigned towards the end of a dispatch, unless they are in very close proximity to another job.
11
+ */
12
+ low = "low",
13
+ /**
14
+ * A normal job that will be done at the first opportunity.
15
+ */
16
+ medium = "medium",
17
+ /**
18
+ * More important job that will be routed to first unless the next high importance job is much farther away.
19
+ */
20
+ high = "high",
21
+ /**
22
+ * Must be done first, before all others.
23
+ */
24
+ urgent = "urgent"
25
+ }
@@ -0,0 +1,99 @@
1
+ import { ILatLng } from "../API/Geography/Interfaces";
2
+ import { LatLng } from "../API/Geography/LatLng";
3
+ import { IIdUlong } from "../API/Interfaces/IIdUlong";
4
+ import { INamed } from "../API/Interfaces/INamed";
5
+ import { ISerializable } from "../API/Interfaces/ISerializable";
6
+ import { TimeSpan } from "../API/TimeSpan";
7
+ import { datetime, timespan, ulong } from "../API/Types";
8
+ import { Place } from "../Places/Place";
9
+ import { DispatchStepState } from "./DispatchStepState";
10
+ import { DispatchStepStatus } from "./DispatchStepStatus";
11
+ /**
12
+ * A portion of work for a {@link DispatchJob}.
13
+ */
14
+ export declare class DispatchStep implements IIdUlong, INamed, ISerializable {
15
+ /**
16
+ *
17
+ * @param json
18
+ */
19
+ static fromJSON(json: any): DispatchStep;
20
+ /**
21
+ * Identifier for this {@link DispatchStep}.
22
+ * This value is unique per {@link DispatchJob}, but is not unique system-wide.
23
+ */
24
+ id: ulong;
25
+ /**
26
+ * A name for the work needed to be performed.
27
+ */
28
+ name: string;
29
+ /**
30
+ * The most recently updated state for this step.
31
+ */
32
+ get status(): DispatchStepStatus;
33
+ /**
34
+ *
35
+ */
36
+ get updated(): Date;
37
+ /**
38
+ * The progress of this step.
39
+ */
40
+ states: Map<DispatchStepStatus, DispatchStepState>;
41
+ /**
42
+ * The optional estimated time of arrival for the asset.
43
+ */
44
+ eta: Date;
45
+ /**
46
+ * The optional expected duration of the work for this step.
47
+ */
48
+ duration: TimeSpan;
49
+ /**
50
+ * The total number of seconds in the {@link duration}.
51
+ */
52
+ get timeOnSite(): number;
53
+ set timeOnSite(value: number);
54
+ /**
55
+ * An optional place which can be used as a template instead of providing lat/long coordinates and a street address.
56
+ * {@link Place.id}
57
+ */
58
+ placeId: ulong;
59
+ /**
60
+ * An optional place which can be used as a template instead of providing lat/long coordinates and a street address.
61
+ * {@link Place.id}
62
+ */
63
+ get place(): Place;
64
+ set place(value: Place);
65
+ /**
66
+ * The street address of where the step must be completed.
67
+ */
68
+ address: string;
69
+ /**
70
+ * The lat/long coordinates of where the step must be {@link DispatchStepStatus.completed}.
71
+ */
72
+ latlng: LatLng | null;
73
+ /**
74
+ * Notes about the status of the work filled in by field-employee.
75
+ */
76
+ notes: string;
77
+ /**
78
+ * Indicates whether this step requires a signature.
79
+ */
80
+ signature: boolean;
81
+ /**
82
+ * The name of the person who signed the step's completion.
83
+ */
84
+ signatory: string;
85
+ constructor(id?: ulong, name?: string, states?: Map<DispatchStepStatus, DispatchStepState>, eta?: Date | number | datetime, duration?: TimeSpan | timespan | number, place?: ulong, address?: string, latlng?: ILatLng | null, notes?: string, signature?: boolean, signatory?: string);
86
+ toJSON(): {
87
+ id: number | null;
88
+ address: string;
89
+ duration: string;
90
+ eta: string;
91
+ latlng: ILatLng | null;
92
+ name: string;
93
+ notes: string;
94
+ place: number | null;
95
+ signature: boolean;
96
+ signatory: string;
97
+ states: object;
98
+ };
99
+ }
@@ -0,0 +1,27 @@
1
+ import { ILatLng } from "../API/Geography/Interfaces";
2
+ import { LatLng } from "../API/Geography/LatLng";
3
+ import { ISerializable } from "../API/Interfaces/ISerializable";
4
+ import { datetime } from "../API/Types";
5
+ /**
6
+ * Details about the lifetime of a {@link DispatchStep}.
7
+ */
8
+ export declare class DispatchStepState implements ISerializable {
9
+ /**
10
+ *
11
+ * @param json
12
+ */
13
+ static fromJSON(json: any): DispatchStepState;
14
+ /**
15
+ * A timestamp from when the lifetime was updated.
16
+ */
17
+ updated: Date;
18
+ /**
19
+ * The coordinates from the {@link Asset} when the update happened.
20
+ */
21
+ latlng: LatLng | null;
22
+ constructor(updated?: Date | number | datetime, latlng?: ILatLng | null);
23
+ toJSON(): {
24
+ updated: string | null;
25
+ latlng: ILatLng | null;
26
+ };
27
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The lifetime of all {@link DispatchStep}s (in order).
3
+ */
4
+ export declare enum DispatchStepStatus {
5
+ /**
6
+ * The {@link DispatchStep} has not yet been started.
7
+ */
8
+ pending = "pending",
9
+ /**
10
+ * The asset is on the way to the {@link DispatchStep}'s location next.
11
+ */
12
+ onRoute = "onRoute",
13
+ /**
14
+ * The asset has arrived at the {@link DispatchStep}'s location.
15
+ */
16
+ arrived = "arrived",
17
+ /**
18
+ * The {@link DispatchStep} is done (or the asset has departed the location).
19
+ */
20
+ completed = "completed"
21
+ }
@@ -0,0 +1,156 @@
1
+ import { BaseComponent } from "../API/BaseComponent";
2
+ import { LatLng } from "../API/Geography/LatLng";
3
+ import { IBelongAsset } from "../API/Interfaces/IBelongAsset";
4
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
5
+ import { IIdUlong } from "../API/Interfaces/IIdUlong";
6
+ import { TimeSpan } from "../API/TimeSpan";
7
+ import { ulong } from "../API/Types";
8
+ import { Asset } from "../Assets/Asset";
9
+ import { Company } from "../Companies/Company";
10
+ import { Place } from "../Places/Place";
11
+ import { DispatchTaskStatus } from "./DispatchTaskStatus";
12
+ import { Document } from "../Hosting/Document";
13
+ /**
14
+ * A task assigned to an asset which represents a coordinate on the map which must be visited.
15
+ * @deprecated Use DispatchJob instead
16
+ */
17
+ export declare class DispatchTask extends BaseComponent implements IIdUlong, IBelongCompany, IBelongAsset {
18
+ /**
19
+ * Unique identifier of this task.
20
+ */
21
+ id: ulong;
22
+ /**
23
+ * The company to which this task belongs.
24
+ * {@link Company.id}
25
+ */
26
+ companyId: ulong;
27
+ /**
28
+ * The company to which this task belongs.
29
+ * {@link Company.id}
30
+ */
31
+ get company(): Company;
32
+ /**
33
+ * The asset to which this task belongs.
34
+ * {@link Asset.id}
35
+ */
36
+ assetId: ulong;
37
+ /**
38
+ * The asset to which this task belongs.
39
+ * {@link Asset.id}
40
+ */
41
+ get asset(): Asset;
42
+ set asset(value: Asset);
43
+ /**
44
+ * The name of this task or the work needed to be performed.
45
+ */
46
+ name: string;
47
+ /**
48
+ * Name/value collections of custom fields used to refer to external systems.
49
+ */
50
+ references: Map<string, string>;
51
+ /**
52
+ * An optional place which can be used as a template instead of providing lat/long coordinates and a street address.
53
+ * {@link Place.id}
54
+ */
55
+ placeId: ulong;
56
+ /**
57
+ * An optional place which can be used as a template instead of providing lat/long coordinates and a street address.
58
+ * {@link Place.id}
59
+ */
60
+ get place(): Place;
61
+ set place(value: Place);
62
+ /**
63
+ * The street address of where the task must be completed.
64
+ */
65
+ address: string;
66
+ /**
67
+ * The lat/long coordinates of where the task must be completed.
68
+ */
69
+ latlng: LatLng;
70
+ /**
71
+ * The progress of this task.
72
+ */
73
+ status: DispatchTaskStatus;
74
+ /**
75
+ * When this task was created.
76
+ */
77
+ created: Date;
78
+ /**
79
+ * The optional estimated time of arrival for the asset.
80
+ */
81
+ eta: Date;
82
+ /**
83
+ * The optional expected duration of the work for this task.
84
+ */
85
+ duration: TimeSpan;
86
+ /**
87
+ * The date/time stamp of when the asset arrived at this task.
88
+ */
89
+ arrived: Date;
90
+ /**
91
+ * The date/time stamp of when this task was completed.
92
+ */
93
+ completed: Date;
94
+ /**
95
+ * Instructions (filled out by dispatcher) for the field-employee to help them completed the task.
96
+ */
97
+ instructions: string;
98
+ /**
99
+ * Indicates whether the task has a signature.
100
+ */
101
+ signature: boolean;
102
+ /**
103
+ * The name of the person who signed the task's completion.
104
+ */
105
+ signatory: string;
106
+ /**
107
+ * Notes about the status of the work filled in by field-employee.
108
+ */
109
+ notes: string;
110
+ /**
111
+ * A list of hosted {@link Document} identifiers attached to this task.
112
+ */
113
+ attachmentIds: ulong[];
114
+ /**
115
+ * A list of hosted {@link Document} identifiers attached to this task.
116
+ */
117
+ get attachments(): Document[];
118
+ set attachments(value: Document[]);
119
+ /**
120
+ * Either the user's login, or provider's identifier that changed this task
121
+ */
122
+ updatedBy: string;
123
+ /**
124
+ * Timestamp from the last change made to this task
125
+ */
126
+ updatedUtc: Date;
127
+ toJSON(): {
128
+ id: number | null;
129
+ company: number | null;
130
+ asset: number | null;
131
+ v: number[];
132
+ name: string;
133
+ references: object;
134
+ place: number | null;
135
+ address: string;
136
+ latlng: import("../API/Geography/Interfaces").ILatLng;
137
+ status: DispatchTaskStatus;
138
+ created: string | null;
139
+ eta: string | null;
140
+ duration: string;
141
+ arrived: string | null;
142
+ completed: string | null;
143
+ instructions: string;
144
+ signature: boolean;
145
+ signatory: string;
146
+ notes: string;
147
+ attachments: number[];
148
+ updatedBy: string;
149
+ updatedUtc: string | null;
150
+ };
151
+ fromJSON(json: any, force?: boolean): boolean;
152
+ /**
153
+ * The {@link id} is the key.
154
+ */
155
+ getKey(): string;
156
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Tasks have a lifetime and each status represents a task's progress through it's life.
3
+ * @deprecated Use {@link DispatchStepStatus} instead
4
+ */
5
+ export declare enum DispatchTaskStatus {
6
+ /**
7
+ * The task has been created, but not yet assigned to an asset.
8
+ */
9
+ created = "created",
10
+ /**
11
+ * The task has been given to an asset (and delivered to the asset's primary device).
12
+ */
13
+ queued = "queued",
14
+ /**
15
+ * The asset is on the way to the task's location next.
16
+ */
17
+ onRoute = "onRoute",
18
+ /**
19
+ * The asset has arrived at the task's location.
20
+ */
21
+ arrived = "arrived",
22
+ /**
23
+ * The task is done.
24
+ */
25
+ completed = "completed",
26
+ /**
27
+ * The task was cancelled by either the asset or a user.
28
+ */
29
+ cancelled = "cancelled",
30
+ /**
31
+ * An item was picked-up for this task.
32
+ */
33
+ pickedUp = "pickedUp",
34
+ /**
35
+ * An item was dropped-off for this task.
36
+ */
37
+ droppedOff = "droppedOff",
38
+ /**
39
+ * The asset is waiting and can't complete the task.
40
+ */
41
+ waiting = "waiting",
42
+ /**
43
+ * An item associated with this task is damaged.
44
+ */
45
+ damaged = "damaged",
46
+ /**
47
+ * The task couldn't be completed by the asset.
48
+ */
49
+ unsuccessful = "unsuccessful"
50
+ }
@@ -0,0 +1,71 @@
1
+ import { BaseComponent } from "../API/BaseComponent";
2
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
+ import { IFileSize } from "../API/Interfaces/IFileSize";
4
+ import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
+ import { INamed } from "../API/Interfaces/INamed";
6
+ import { ulong } from "../API/Types";
7
+ import { Company } from "../Companies/Company";
8
+ /**
9
+ * A file stored temporarily by the system.
10
+ */
11
+ export declare class Document extends BaseComponent implements IIdUlong, INamed, IBelongCompany, IFileSize {
12
+ /**
13
+ * Unique identifier of this file.
14
+ */
15
+ id: ulong;
16
+ /**
17
+ * The company to which this file belongs.
18
+ * {@link Company.id}
19
+ */
20
+ companyId: ulong;
21
+ /**
22
+ * The company to which this file belongs.
23
+ * {@link Company.id}
24
+ */
25
+ get company(): Company;
26
+ /**
27
+ * The file name of this file.
28
+ */
29
+ name: string;
30
+ /**
31
+ * Notes about this file.
32
+ */
33
+ notes: string;
34
+ /**
35
+ * The URL/path to find this file.
36
+ */
37
+ src: string;
38
+ /**
39
+ * The file-size on the disk.
40
+ */
41
+ bytes: ulong;
42
+ /**
43
+ * The MIME type of the file.
44
+ */
45
+ mime: string;
46
+ /**
47
+ * The date and time this fill will be automatically purged from our system.
48
+ */
49
+ expiry: Date;
50
+ /**
51
+ * Name/value collections of custom fields used to refer to external systems.
52
+ */
53
+ references: Map<string, string>;
54
+ toJSON(): {
55
+ id: number | null;
56
+ v: number[];
57
+ company: number;
58
+ name: string;
59
+ notes: string;
60
+ src: string;
61
+ mime: string;
62
+ bytes: number;
63
+ expiry: string | null;
64
+ references: Map<string, any>;
65
+ };
66
+ fromJSON(json: any, force?: boolean): boolean;
67
+ /**
68
+ * The {@link id} is the key.
69
+ */
70
+ getKey(): string;
71
+ }
@@ -0,0 +1,38 @@
1
+ import { byte, ulong } from '../../API/Types';
2
+ import { FormFieldBase } from './FormFieldBase';
3
+ import { FormFieldType } from '../FormFieldType';
4
+ /**
5
+ * A control to allow the user to attach {@link Picture}s or {@link Document}s.
6
+ */
7
+ export declare class FormFieldAttachments extends FormFieldBase {
8
+ /**
9
+ * Takes a string as input and returns an array split by comma with trimmed items.
10
+ * @param values
11
+ */
12
+ static splitValues(values: string): string[];
13
+ /**
14
+ * These are the attachment types.
15
+ */
16
+ protected get supported(): FormFieldType[];
17
+ /**
18
+ * Minimum number of {@link Document}s and/or {@link Picture}s that must be attached.
19
+ */
20
+ minimum: byte;
21
+ /**
22
+ * Maximum number of {@link Document}s and/or {@link Picture}s that must be attached.
23
+ */
24
+ maximum: byte;
25
+ constructor(id?: ulong, name?: string, kind?: FormFieldType, minimum?: byte, maximum?: byte, notes?: string, required?: boolean, value?: string | null, editable?: boolean);
26
+ toJSON(): {
27
+ minimum: number | null;
28
+ maximum: number | null;
29
+ id: number | null;
30
+ kind: FormFieldType;
31
+ name: string;
32
+ notes: string;
33
+ required: boolean;
34
+ value: string | null;
35
+ editable: boolean;
36
+ };
37
+ isValid(value: string): boolean;
38
+ }
@@ -0,0 +1,71 @@
1
+ import { IIdUlong } from '../../API/Interfaces/IIdUlong';
2
+ import { INamed } from '../../API/Interfaces/INamed';
3
+ import { ISerializable } from '../../API/Interfaces/ISerializable';
4
+ import { ulong } from '../../API/Types';
5
+ import { FormFieldType } from '../FormFieldType';
6
+ import { FormFieldAttachments } from './FormFieldAttachments';
7
+ import { FormFieldBoolean } from './FormFieldBoolean';
8
+ import { FormFieldChoice } from './FormFieldChoice';
9
+ import { FormFieldDate } from './FormFieldDate';
10
+ import { FormFieldNumeric } from './FormFieldNumeric';
11
+ import { FormFieldSignature } from './FormFieldSignature';
12
+ import { FormFieldText } from './FormFieldText';
13
+ import { FormFieldTime } from './FormFieldTime';
14
+ import { FormFieldTimezone } from './FormFieldTimezone';
15
+ /**
16
+ * A base class for the common form field UI members.
17
+ */
18
+ export declare abstract class FormFieldBase implements IIdUlong, INamed, ISerializable {
19
+ /**
20
+ * Instantiates a form field based on the kind property in the given JSON.
21
+ * @param json
22
+ */
23
+ static fromJSON(json: any): FormFieldText | FormFieldChoice | FormFieldBoolean | FormFieldNumeric | FormFieldDate | FormFieldTime | FormFieldSignature | FormFieldAttachments | FormFieldTimezone;
24
+ /**
25
+ * A list of supported {@link FormFieldType}s that this class supports.
26
+ */
27
+ protected get supported(): FormFieldType[];
28
+ /**
29
+ * The type of interface control that should be presented to the user.
30
+ */
31
+ kind: FormFieldType;
32
+ /**
33
+ * Identifier for this field.
34
+ * This value is unique per {@link FormTemplate}, but is not unique system-wide.
35
+ */
36
+ id: ulong;
37
+ /**
38
+ * Name of the field.
39
+ */
40
+ name: string;
41
+ /**
42
+ * Notes or special instructions for this control.
43
+ */
44
+ notes: string;
45
+ /**
46
+ * When true, a valid value must be given for this field.
47
+ */
48
+ required: boolean;
49
+ /**
50
+ * The default value for the field in the template.
51
+ */
52
+ value: string | null;
53
+ /**
54
+ * When false, this field's value is treated as read-only.
55
+ */
56
+ editable: boolean;
57
+ constructor(id?: ulong, name?: string, kind?: FormFieldType, notes?: string, required?: boolean, value?: string | null, editable?: boolean);
58
+ toJSON(): {
59
+ id: number | null;
60
+ kind: FormFieldType;
61
+ name: string;
62
+ notes: string;
63
+ required: boolean;
64
+ value: string | null;
65
+ editable: boolean;
66
+ };
67
+ /**
68
+ * Returns true if the value can be parsed by the field type.
69
+ */
70
+ abstract isValid(value: string): boolean;
71
+ }
@@ -0,0 +1,46 @@
1
+ import { ulong } from "../../API/Types";
2
+ import { FormFieldType } from "../FormFieldType";
3
+ import { FormFieldBase } from "./FormFieldBase";
4
+ /**
5
+ * A true/false (or either-or) input control.
6
+ * @tutorial
7
+ * For choices, the field definition will be an array of three values.
8
+ * The first value is the "true", second is the "false", and third is "indeterminate".
9
+ * For example:
10
+ * - "true", "false", ""
11
+ * - "on", "off", "unknown"
12
+ * - "yes", "no", "maybe"
13
+ */
14
+ export declare class FormFieldBoolean extends FormFieldBase {
15
+ /**
16
+ * If no choices are given, then these choices are used.
17
+ **/
18
+ static DEFAULT_CHOICES: [string, string, string];
19
+ /**
20
+ * Returns an array of 3 strings representing the checked, unchecked, and indeterminate values.
21
+ * @param choices
22
+ * @returns
23
+ */
24
+ static parseChoices(choices?: (string | null)[] | null): [string, string, string];
25
+ /**
26
+ * These are the boolean control types.
27
+ */
28
+ protected get supported(): FormFieldType[];
29
+ /**
30
+ * These three values are the values of the choices presented.
31
+ * The first value is the "checked" value, second is the "unchecked" value, and third is "indeterminate" value.
32
+ */
33
+ choices: [string, string, string];
34
+ constructor(id?: ulong, name?: string, kind?: FormFieldType, choices?: string[], notes?: string, required?: boolean, value?: string | null, editable?: boolean);
35
+ toJSON(): {
36
+ choices: string[];
37
+ id: number | null;
38
+ kind: FormFieldType;
39
+ name: string;
40
+ notes: string;
41
+ required: boolean;
42
+ value: string | null;
43
+ editable: boolean;
44
+ };
45
+ isValid(value: string): boolean;
46
+ }
@@ -0,0 +1,48 @@
1
+ import { byte, ulong } from "../../API/Types";
2
+ import { FormFieldType } from "../FormFieldType";
3
+ import { FormFieldBase } from "./FormFieldBase";
4
+ /**
5
+ * A single- or multiple-choice input control.
6
+ */
7
+ export declare class FormFieldChoice extends FormFieldBase {
8
+ /**
9
+ * Splits the given value using commas (so long as the comma did not get escaped).
10
+ * @param values
11
+ */
12
+ static splitValues(values: string): string[];
13
+ /**
14
+ * Replaces all the commas in a given value with backslash-comma.
15
+ * @param value
16
+ */
17
+ static escapeValue(value: string): string;
18
+ /**
19
+ * Just {@link FormFieldType.choice} control type.
20
+ */
21
+ protected get supported(): FormFieldType[];
22
+ /**
23
+ * The list of choices available and their values.
24
+ */
25
+ choices: Map<string, string>;
26
+ /**
27
+ * Minimum number of choices that must be selected.
28
+ */
29
+ minimum: byte;
30
+ /**
31
+ * Maximum number of choices that must be selected.
32
+ */
33
+ maximum: byte;
34
+ constructor(id?: ulong, name?: string, kind?: FormFieldType, choices?: Map<string, string>, minimum?: byte, maximum?: byte, notes?: string, required?: boolean, value?: string | null, editable?: boolean);
35
+ toJSON(): {
36
+ choices: object;
37
+ minimum: number | null;
38
+ maximum: number | null;
39
+ id: number | null;
40
+ kind: FormFieldType;
41
+ name: string;
42
+ notes: string;
43
+ required: boolean;
44
+ value: string | null;
45
+ editable: boolean;
46
+ };
47
+ isValid(value: string): boolean;
48
+ }
@@ -0,0 +1,33 @@
1
+ import { datetime, ulong } from "../../API/Types";
2
+ import { FormFieldType } from "../FormFieldType";
3
+ import { FormFieldBase } from "./FormFieldBase";
4
+ /**
5
+ * A control to choose a date and (optionally) a time.
6
+ */
7
+ export declare class FormFieldDate extends FormFieldBase {
8
+ /**
9
+ * These are the calendar control types.
10
+ */
11
+ protected get supported(): FormFieldType[];
12
+ /**
13
+ * The earliest date or date/time.
14
+ */
15
+ minimum: Date;
16
+ /**
17
+ * The latest date or date/time.
18
+ */
19
+ maximum: Date;
20
+ constructor(id?: ulong, name?: string, kind?: FormFieldType, minimum?: Date | number | datetime, maximum?: Date | number | datetime, notes?: string, required?: boolean, value?: string | null, editable?: boolean);
21
+ toJSON(): {
22
+ minimum: string | null;
23
+ maximum: string | null;
24
+ id: number | null;
25
+ kind: FormFieldType;
26
+ name: string;
27
+ notes: string;
28
+ required: boolean;
29
+ value: string | null;
30
+ editable: boolean;
31
+ };
32
+ isValid(value: string): boolean;
33
+ }