@trakit/objects 0.0.1 → 0.0.5

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 (155) hide show
  1. package/API/Base.d.ts +3 -2
  2. package/API/BaseComponent.d.ts +9 -6
  3. package/API/Codifier.d.ts +11 -1
  4. package/API/Encoding.d.ts +9 -0
  5. package/API/Files.d.ts +4 -4
  6. package/API/Functions.d.ts +26 -21
  7. package/API/Geography/Functions.d.ts +4 -0
  8. package/API/Geography/Interfaces.d.ts +19 -14
  9. package/API/Geography/LatLng.d.ts +9 -1
  10. package/API/Geography/LatLngBounds.d.ts +2 -1
  11. package/API/Geography/Position.d.ts +23 -11
  12. package/API/Geography/StreetAddress.d.ts +3 -2
  13. package/API/Geometry/Functions.d.ts +1 -1
  14. package/API/Geometry/Point.d.ts +4 -3
  15. package/API/Geometry/Radial.d.ts +5 -4
  16. package/API/Geometry/Rectangle.d.ts +3 -7
  17. package/API/Geometry/Size.d.ts +8 -2
  18. package/API/Interfaces/IAuditable.d.ts +31 -0
  19. package/API/Interfaces/IDeserializable.d.ts +2 -1
  20. package/API/Interfaces/ILabelled.d.ts +2 -1
  21. package/API/Interfaces/IRequestable.d.ts +5 -1
  22. package/API/Objects.d.ts +0 -28
  23. package/API/SearchPattern.d.ts +3 -2
  24. package/API/TimeSpan.d.ts +7 -38
  25. package/API/Timezone.d.ts +3 -3
  26. package/API/Types.d.ts +18 -0
  27. package/Accounts/Contact.d.ts +10 -10
  28. package/Accounts/Machine.d.ts +14 -6
  29. package/Accounts/Permissions/Permission.d.ts +3 -3
  30. package/Accounts/Permissions/PermissionEscalation.d.ts +11 -3
  31. package/Accounts/Permissions/PermissionEscalationState.d.ts +5 -3
  32. package/Accounts/Session.d.ts +2 -2
  33. package/Accounts/User.d.ts +10 -10
  34. package/Accounts/UserAdvanced.d.ts +2 -2
  35. package/Accounts/UserGeneral.d.ts +5 -5
  36. package/Accounts/UserGroup.d.ts +3 -3
  37. package/Accounts/UserNotifications.d.ts +2 -2
  38. package/Assets/Asset.d.ts +56 -24
  39. package/Assets/AssetAdvanced.d.ts +8 -20
  40. package/Assets/AssetAttribute.d.ts +2 -2
  41. package/Assets/AssetDispatch.d.ts +5 -12
  42. package/Assets/AssetGeneral.d.ts +44 -24
  43. package/Assets/AssetPlaceStatus.d.ts +2 -2
  44. package/Behaviours/Behaviour.d.ts +4 -4
  45. package/Behaviours/BehaviourLog.d.ts +3 -3
  46. package/Behaviours/BehaviourParameter.d.ts +2 -1
  47. package/Behaviours/BehaviourScript.d.ts +4 -4
  48. package/Billing/BillableBase.d.ts +3 -3
  49. package/Billing/BillableSmsProfile.d.ts +2 -2
  50. package/Billing/BillingProfile.d.ts +3 -3
  51. package/Billing/Hosting/BillableHostingBase.d.ts +2 -2
  52. package/Billing/Hosting/BillableHostingDiscount.d.ts +2 -1
  53. package/Billing/Hosting/BillableHostingLicense.d.ts +2 -1
  54. package/Billing/Hosting/BillableHostingRule.d.ts +2 -1
  55. package/Billing/Report/BillingReport.d.ts +3 -3
  56. package/Billing/Report/BillingReportBreakdown.d.ts +2 -2
  57. package/Billing/Report/BillingReportHostingSummary.d.ts +2 -2
  58. package/Billing/Report/BillingReportLicenseBreakdown.d.ts +2 -2
  59. package/Billing/Report/BillingReportServiceBreakdown.d.ts +2 -2
  60. package/Billing/Report/BillingReportSummary.d.ts +2 -2
  61. package/Companies/ColourStyle.d.ts +2 -2
  62. package/Companies/Company.d.ts +48 -33
  63. package/Companies/CompanyDirectory.d.ts +10 -5
  64. package/Companies/CompanyGeneral.d.ts +10 -5
  65. package/Companies/{CompanyPolicies.d.ts → CompanyPolicy.d.ts} +9 -4
  66. package/Companies/CompanyReseller.d.ts +14 -9
  67. package/Companies/{CompanyStyles.d.ts → CompanyStyle.d.ts} +11 -6
  68. package/Companies/LabelStyle.d.ts +2 -2
  69. package/Companies/NotificationServerEmail.d.ts +2 -2
  70. package/Companies/NotificationServerSms.d.ts +3 -3
  71. package/Companies/PasswordPolicy.d.ts +2 -2
  72. package/Companies/SessionPolicy.d.ts +2 -2
  73. package/Dispatch/DispatchDirection.d.ts +3 -3
  74. package/Dispatch/DispatchJob.d.ts +4 -4
  75. package/Dispatch/DispatchStep.d.ts +4 -4
  76. package/Dispatch/DispatchStepState.d.ts +3 -3
  77. package/Dispatch/DispatchTask.d.ts +5 -5
  78. package/Hosting/Document.d.ts +3 -3
  79. package/Hosting/Fields/FormFieldAttachments.d.ts +4 -11
  80. package/Hosting/Fields/FormFieldBase.d.ts +8 -23
  81. package/Hosting/Fields/FormFieldBase_fromJSON.d.ts +1 -0
  82. package/Hosting/Fields/FormFieldBoolean.d.ts +4 -12
  83. package/Hosting/Fields/FormFieldChoice.d.ts +10 -12
  84. package/Hosting/Fields/FormFieldDate.d.ts +2 -9
  85. package/Hosting/Fields/FormFieldNumeric.d.ts +2 -9
  86. package/Hosting/Fields/FormFieldSignature.d.ts +2 -2
  87. package/Hosting/Fields/FormFieldText.d.ts +2 -9
  88. package/Hosting/Fields/FormFieldTime.d.ts +12 -9
  89. package/Hosting/Fields/FormFieldTimezone.d.ts +2 -2
  90. package/Hosting/FormResult.d.ts +4 -4
  91. package/Hosting/FormTemplate.d.ts +3 -3
  92. package/Images/Dashcam.d.ts +3 -3
  93. package/Images/DashcamBase.d.ts +2 -2
  94. package/Images/DashcamLive.d.ts +3 -3
  95. package/Images/Icon.d.ts +7 -27
  96. package/Images/IconGlyph.d.ts +5 -12
  97. package/Images/IconLabel.d.ts +5 -8
  98. package/Images/Picture.d.ts +3 -3
  99. package/Maintenance/MaintenanceInterval.d.ts +2 -2
  100. package/Maintenance/MaintenanceJob.d.ts +3 -3
  101. package/Maintenance/MaintenanceSchedule.d.ts +4 -4
  102. package/Messaging/AssetAlert.d.ts +2 -1
  103. package/Messaging/AssetMessage.d.ts +2 -2
  104. package/Messaging/MessageBase.d.ts +3 -3
  105. package/Places/Place.d.ts +4 -4
  106. package/Providers/Config/ProviderConfig.d.ts +4 -4
  107. package/Providers/Config/ProviderRegistration.d.ts +2 -2
  108. package/Providers/Config/ProviderScript.d.ts +4 -4
  109. package/Providers/Config/ProviderScriptBlock.d.ts +2 -1
  110. package/Providers/Config/ProviderScriptParameter.d.ts +2 -2
  111. package/Providers/Configuration/ProviderConfiguration.d.ts +4 -4
  112. package/Providers/Configuration/ProviderConfigurationNode.d.ts +4 -3
  113. package/Providers/Configuration/ProviderConfigurationType.d.ts +4 -4
  114. package/Providers/Configuration/ProviderGeofenceBase.d.ts +6 -8
  115. package/Providers/Configuration/ProviderGeofenceBase_fromJSON.d.ts +1 -0
  116. package/Providers/Provider.d.ts +80 -14
  117. package/Providers/ProviderAdvanced.d.ts +4 -4
  118. package/Providers/ProviderCommand.d.ts +2 -2
  119. package/Providers/ProviderControl.d.ts +3 -3
  120. package/Providers/ProviderData.d.ts +2 -2
  121. package/Providers/ProviderGeneral.d.ts +18 -10
  122. package/Reports/ReportBreakdown.d.ts +9 -32
  123. package/Reports/ReportBreakdownJob.d.ts +6 -31
  124. package/Reports/ReportBreakdownMessage.d.ts +7 -32
  125. package/Reports/ReportBreakdownTask.d.ts +6 -31
  126. package/Reports/ReportBreakdown_fromJSON.d.ts +1 -0
  127. package/Reports/ReportNotifications.d.ts +3 -3
  128. package/Reports/ReportOptions.d.ts +3 -2
  129. package/Reports/ReportParameter.d.ts +2 -1
  130. package/Reports/ReportRecurrence.d.ts +2 -2
  131. package/Reports/ReportResult.d.ts +9 -9
  132. package/Reports/ReportSchedule.d.ts +3 -3
  133. package/Reports/ReportScorecard.d.ts +3 -3
  134. package/Reports/ReportScorecardParameter.d.ts +2 -2
  135. package/Reports/ReportScorecardRules.d.ts +2 -2
  136. package/Reports/ReportSummary.d.ts +5 -33
  137. package/Reports/ReportTemplate.d.ts +3 -3
  138. package/Reports/ReportTotal.d.ts +2 -2
  139. package/index.d.ts +406 -0
  140. package/package.json +31 -22
  141. package/{Storage.d.ts → storage.d.ts} +11 -1
  142. package/trakit-objects.min.js +8 -0
  143. package/API/Component.d.ts +0 -42
  144. package/API/Compound.d.ts +0 -19
  145. package/Assets/Person.d.ts +0 -25
  146. package/Assets/PersonGeneral.d.ts +0 -35
  147. package/Assets/Trailer.d.ts +0 -42
  148. package/Assets/TrailerGeneral.d.ts +0 -47
  149. package/Assets/Vehicle.d.ts +0 -73
  150. package/Assets/VehicleAdvanced.d.ts +0 -25
  151. package/Assets/VehicleGeneral.d.ts +0 -33
  152. package/README.md +0 -13
  153. package/Reports/ReportDataTotal.d.ts +0 -50
  154. package/objects.d.ts +0 -534
  155. package/objects.min.js +0 -7
@@ -4,7 +4,7 @@ import { IBelongCompany } from "../../API/Interfaces/IBelongCompany";
4
4
  import { INamed } from "../../API/Interfaces/INamed";
5
5
  import { IRequestable } from "../../API/Interfaces/IRequestable";
6
6
  import { ISerializable } from "../../API/Interfaces/ISerializable";
7
- import { email, phone, ulong } from "../../API/Types";
7
+ import { email, phone, ulong, JsonObject } from "../../API/Types";
8
8
  import { User } from "../../Accounts/User";
9
9
  import { Asset } from "../../Assets/Asset";
10
10
  import { Company } from "../../Companies/Company";
@@ -115,7 +115,7 @@ export declare class ProviderRegistration extends Base implements IRequestable,
115
115
  asset: number | null;
116
116
  phoneNumber: number | null;
117
117
  };
118
- fromJSON(json: any, force?: boolean): boolean;
118
+ fromJSON(json: JsonObject, force?: boolean): boolean;
119
119
  /**
120
120
  * The {@link code} is the key.
121
121
  */
@@ -4,7 +4,7 @@ import { IGlobal } from "../../API/Interfaces/IGlobal";
4
4
  import { IIdUlong } from "../../API/Interfaces/IIdUlong";
5
5
  import { INamed } from "../../API/Interfaces/INamed";
6
6
  import { IVisual } from "../../API/Interfaces/IVisual";
7
- import { codified, colour, ulong } from "../../API/Types";
7
+ import { JsonObject, codified, colour, ulong } from "../../API/Types";
8
8
  import { Company } from "../../Companies/Company";
9
9
  import { ProviderType } from "../ProviderType";
10
10
  import { ProviderScriptBlock } from "./ProviderScriptBlock";
@@ -77,11 +77,11 @@ export declare class ProviderScript extends BaseComponent implements IIdUlong, I
77
77
  global: boolean;
78
78
  kind: ProviderType;
79
79
  blocks: any[];
80
- parameters: object;
80
+ parameters: JsonObject;
81
81
  };
82
- fromJSON(json: any, force?: boolean): boolean;
82
+ fromJSON(json: JsonObject, force?: boolean): boolean;
83
83
  /**
84
84
  * The {@link id} is the key.
85
85
  */
86
- getKey(): string;
86
+ getKey(): number;
87
87
  }
@@ -1,4 +1,5 @@
1
1
  import { ISerializable } from "../../API/Interfaces/ISerializable";
2
+ import { JsonObject } from "../../API/Types";
2
3
  /**
3
4
  * A chunk of script and variables used to assemble a working ProviderScript.
4
5
  */
@@ -8,7 +9,7 @@ export declare class ProviderScriptBlock implements ISerializable {
8
9
  * @param json
9
10
  * @returns
10
11
  */
11
- static fromJSON(json: any): ProviderScriptBlock;
12
+ static fromJSON(json: JsonObject): ProviderScriptBlock;
12
13
  /**
13
14
  * A chunk of the file loaded onto a provider with it's variables replaced with configurable variables.
14
15
  * Trailing or leading whitespace should be included here, so when blocks are merged, so too is the newline characters.
@@ -1,5 +1,5 @@
1
1
  import { ISerializable } from "../../API/Interfaces/ISerializable";
2
- import { uint } from "../../API/Types";
2
+ import { uint, JsonObject } from "../../API/Types";
3
3
  import { ProviderScriptParameterType } from "./ProviderScriptParameterType";
4
4
  /**
5
5
  * Definition of an argument passed to a ProviderScript.
@@ -10,7 +10,7 @@ export declare class ProviderScriptParameter implements ISerializable {
10
10
  * @param json
11
11
  * @returns
12
12
  */
13
- static fromJSON(json: any): ProviderScriptParameter;
13
+ static fromJSON(json: JsonObject): ProviderScriptParameter;
14
14
  /**
15
15
  * Simple type information for the gateway to process.
16
16
  */
@@ -2,7 +2,7 @@ import { BaseComponent } from "../../API/BaseComponent";
2
2
  import { IBelongCompany } from "../../API/Interfaces/IBelongCompany";
3
3
  import { IIdUlong } from "../../API/Interfaces/IIdUlong";
4
4
  import { INamed } from "../../API/Interfaces/INamed";
5
- import { ulong } from "../../API/Types";
5
+ import { JsonObject, ulong } from "../../API/Types";
6
6
  import { Company } from "../../Companies/Company";
7
7
  import { ProviderConfigurationType } from "./ProviderConfigurationType";
8
8
  /**
@@ -57,12 +57,12 @@ export declare class ProviderConfiguration extends BaseComponent implements IIdU
57
57
  name: string;
58
58
  notes: string;
59
59
  type: number | null;
60
- scriptParameters: object;
60
+ scriptParameters: JsonObject;
61
61
  geofences: number[];
62
62
  };
63
- fromJSON(json: any, force?: boolean): boolean;
63
+ fromJSON(json: JsonObject, force?: boolean): boolean;
64
64
  /**
65
65
  * The {@link id} is the key.
66
66
  */
67
- getKey(): string;
67
+ getKey(): number;
68
68
  }
@@ -1,4 +1,5 @@
1
1
  import { ISerializable } from '../../API/Interfaces/ISerializable';
2
+ import { JsonObject } from '../../API/Types';
2
3
  /**
3
4
  * This tree-like structure is given to the script processor for the device type so that the device can follow a program.
4
5
  * @deprecated Use ProviderScriptBlock instead
@@ -8,12 +9,12 @@ export declare class ProviderConfigurationNode implements ISerializable {
8
9
  *
9
10
  * @param json
10
11
  */
11
- static nodesFromJSON(json: any): Map<string, ProviderConfigurationNode>;
12
+ static nodesFromJSON(json: JsonObject): Map<string, ProviderConfigurationNode>;
12
13
  /**
13
14
  *
14
15
  * @param json
15
16
  */
16
- static fromJSON(json: any): ProviderConfigurationNode;
17
+ static fromJSON(json: JsonObject): ProviderConfigurationNode;
17
18
  /**
18
19
  * Indicates that this configuration is an advanced property and should only be set by someone who knows what they're doing.
19
20
  */
@@ -60,6 +61,6 @@ export declare class ProviderConfigurationNode implements ISerializable {
60
61
  unit: string;
61
62
  notes: string;
62
63
  isAdvanced: boolean;
63
- nodes: object;
64
+ nodes: JsonObject;
64
65
  };
65
66
  }
@@ -1,7 +1,7 @@
1
1
  import { BaseComponent } from "../../API/BaseComponent";
2
2
  import { IIdUlong } from "../../API/Interfaces/IIdUlong";
3
3
  import { INamed } from "../../API/Interfaces/INamed";
4
- import { uint, ulong } from "../../API/Types";
4
+ import { JsonObject, uint, ulong } from "../../API/Types";
5
5
  import { PlaceType } from "../../Places/PlaceType";
6
6
  import { ProviderType } from "../ProviderType";
7
7
  import { ProviderConfigurationNode } from "./ProviderConfigurationNode";
@@ -51,12 +51,12 @@ export declare class ProviderConfigurationType extends BaseComponent implements
51
51
  providerType: ProviderType;
52
52
  maxGeofenceCount: number | null;
53
53
  minGeofenceCount: number | null;
54
- scriptOptions: object;
54
+ scriptOptions: JsonObject;
55
55
  geofenceTypes: PlaceType[];
56
56
  };
57
- fromJSON(json: any, force?: boolean): boolean;
57
+ fromJSON(json: JsonObject, force?: boolean): boolean;
58
58
  /**
59
59
  * The {@link id} is the key.
60
60
  */
61
- getKey(): string;
61
+ getKey(): number;
62
62
  }
@@ -1,20 +1,18 @@
1
1
  import { ISerializable } from "../../API/Interfaces/ISerializable";
2
- import { uint } from "../../API/Types";
2
+ import { JsonObject, uint } from "../../API/Types";
3
3
  import { PlaceType } from "../../Places/PlaceType";
4
- import { ProviderGeofenceCircular } from "./ProviderGeofenceCircular";
5
- import { ProviderGeofencePoint } from "./ProviderGeofencePoint";
6
- import { ProviderGeofencePolygon } from "./ProviderGeofencePolygon";
7
- import { ProviderGeofenceRectangle } from "./ProviderGeofenceRectangle";
8
4
  /**
9
5
  * An abstract class used as a base for all Geofence type classes.
10
6
  * @deprecated
11
7
  */
12
8
  export declare abstract class ProviderGeofenceBase implements ISerializable {
13
9
  /**
14
- *
15
- * @param json
10
+ * Instantiates a geofence based on the `type` property in the given JSON.
11
+ * Implementation is in {@link ProviderGeofenceBase_fromJSON.ts}
12
+ * @param json The JSON to parse.
13
+ * @returns An instance of a {@link ProviderGeofenceBase} subclass.
16
14
  */
17
- static fromJSON(json: any): ProviderGeofencePoint | ProviderGeofenceCircular | ProviderGeofenceRectangle | ProviderGeofencePolygon;
15
+ static fromJSON: (json: JsonObject) => ProviderGeofenceBase;
18
16
  /**
19
17
  * The supported shape of geofence.
20
18
  */
@@ -3,8 +3,11 @@ import { BaseCompound } from "../API/BaseCompound";
3
3
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
4
  import { INamed } from "../API/Interfaces/INamed";
5
5
  import { ISuspendable } from "../API/Interfaces/ISuspendable";
6
- import { ipv4, phone, ulong } from "../API/Types";
6
+ import { JsonObject, ipv4, phone, ulong } from "../API/Types";
7
+ import { Asset } from "../Assets/Asset";
7
8
  import { Company } from "../Companies/Company";
9
+ import { ProviderConfig } from "./Config/ProviderConfig";
10
+ import { ProviderConfiguration } from "./Configuration/ProviderConfiguration";
8
11
  import { ProviderAdvanced } from "./ProviderAdvanced";
9
12
  import { ProviderCommand } from "./ProviderCommand";
10
13
  import { ProviderCommandType } from "./ProviderCommandType";
@@ -56,15 +59,28 @@ export declare class Provider extends BaseCompound implements INamed, IBelongCom
56
59
  * The asset for which this device provides field data.
57
60
  * {@link Asset.id}
58
61
  */
59
- get asset(): ulong;
60
- set asset(value: ulong);
62
+ get assetId(): ulong;
63
+ set assetId(value: ulong);
64
+ /**
65
+ * The asset for which this device provides field data.
66
+ * {@link Asset.id}
67
+ */
68
+ get asset(): Asset;
69
+ set asset(value: Asset);
70
+ /**
71
+ * The provider's current (or pending) configuration profile.
72
+ * {@link ProviderConfig.id}
73
+ * {@link ProviderConfiguration.id}
74
+ */
75
+ get configurationId(): ulong;
76
+ set configurationId(value: ulong);
61
77
  /**
62
78
  * The provider's current (or pending) configuration profile.
63
79
  * {@link ProviderConfig.id}
64
80
  * {@link ProviderConfiguration.id}
65
81
  */
66
- get configuration(): ulong;
67
- set configuration(value: ulong);
82
+ get configuration(): ProviderConfig | ProviderConfiguration;
83
+ set configuration(value: ProviderConfig | ProviderConfiguration);
68
84
  /**
69
85
  * The password programmed on the device used to ensure the system is the only client authorized to make changes.
70
86
  */
@@ -113,23 +129,73 @@ export declare class Provider extends BaseCompound implements INamed, IBelongCom
113
129
  get commands(): Map<ProviderCommandType, ProviderCommand>;
114
130
  set commands(value: Map<ProviderCommandType, ProviderCommand>);
115
131
  toJSON(): {
116
- asset?: number | null | undefined;
117
- password?: string | undefined;
118
- firmware?: string | undefined;
119
- phoneNumber?: number | null | undefined;
120
- information?: object | undefined;
121
- sim?: string | undefined;
122
- suspended?: boolean | undefined;
123
- since?: string | null | undefined;
132
+ suspended: boolean;
133
+ since: string | null;
134
+ id: string | null;
135
+ v: number[];
136
+ company: number | null;
137
+ name: string;
138
+ notes: string;
139
+ kind: ProviderType;
140
+ configuration: number | null;
141
+ } | {
142
+ asset: number | null;
143
+ password: string;
144
+ firmware: string;
145
+ phoneNumber: number | null;
146
+ information: JsonObject;
147
+ sim: string;
124
148
  id: string | null;
149
+ v: number[];
125
150
  company: number | null;
151
+ name: string;
152
+ notes: string;
126
153
  kind: ProviderType;
154
+ configuration: number | null;
155
+ } | {
156
+ control: {
157
+ id: string | null;
158
+ v: number[];
159
+ company: number | null;
160
+ commands: JsonObject;
161
+ };
162
+ v: number[];
163
+ id: string | null;
164
+ company: number;
165
+ lastIP: string;
166
+ attributes: JsonObject;
167
+ snf: JsonObject;
168
+ suspended: boolean;
169
+ since: string | null;
127
170
  name: string;
128
171
  notes: string;
172
+ kind: ProviderType;
129
173
  configuration: number | null;
174
+ } | {
175
+ control: {
176
+ id: string | null;
177
+ v: number[];
178
+ company: number | null;
179
+ commands: JsonObject;
180
+ };
130
181
  v: number[];
182
+ id: string | null;
183
+ company: number;
184
+ lastIP: string;
185
+ attributes: JsonObject;
186
+ snf: JsonObject;
187
+ asset: number | null;
188
+ password: string;
189
+ firmware: string;
190
+ phoneNumber: number | null;
191
+ information: JsonObject;
192
+ sim: string;
193
+ name: string;
194
+ notes: string;
195
+ kind: ProviderType;
196
+ configuration: number | null;
131
197
  };
132
- fromJSON(json: any, force?: boolean): boolean;
198
+ fromJSON(json: JsonObject, force?: boolean): boolean;
133
199
  /**
134
200
  * The {@link id} is the key.
135
201
  */
@@ -1,6 +1,6 @@
1
1
  import { BaseComponent } from "../API/BaseComponent";
2
2
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
- import { ipv4, ulong } from "../API/Types";
3
+ import { JsonObject, ipv4, ulong } from "../API/Types";
4
4
  import { Company } from "../Companies/Company";
5
5
  import { ProviderData } from "./ProviderData";
6
6
  /**
@@ -40,10 +40,10 @@ export declare class ProviderAdvanced extends BaseComponent implements IBelongCo
40
40
  v: number[];
41
41
  company: number;
42
42
  lastIP: string;
43
- attributes: object;
44
- snf: object;
43
+ attributes: JsonObject;
44
+ snf: JsonObject;
45
45
  };
46
- fromJSON(json: any, force?: boolean): boolean;
46
+ fromJSON(json: JsonObject, force?: boolean): boolean;
47
47
  /**
48
48
  * The {@link id} is the key.
49
49
  */
@@ -1,5 +1,5 @@
1
1
  import { ISerializable } from "../API/Interfaces/ISerializable";
2
- import { datetime } from "../API/Types";
2
+ import { datetime, JsonObject } from "../API/Types";
3
3
  import { ProviderCommandStatus } from "./ProviderCommandStatus";
4
4
  /**
5
5
  * Details regarding a provider command
@@ -9,7 +9,7 @@ export declare class ProviderCommand implements ISerializable {
9
9
  *
10
10
  * @param json
11
11
  */
12
- static fromJSON(json: any): ProviderCommand;
12
+ static fromJSON(json: JsonObject): ProviderCommand;
13
13
  /**
14
14
  * Current status of this command.
15
15
  */
@@ -1,6 +1,6 @@
1
1
  import { BaseComponent } from "../API/BaseComponent";
2
2
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
- import { ulong } from "../API/Types";
3
+ import { JsonObject, ulong } from "../API/Types";
4
4
  import { Company } from "../Companies/Company";
5
5
  import { ProviderCommand } from "./ProviderCommand";
6
6
  import { ProviderCommandType } from "./ProviderCommandType";
@@ -32,9 +32,9 @@ export declare class ProviderControl extends BaseComponent implements IBelongCom
32
32
  id: string | null;
33
33
  v: number[];
34
34
  company: number | null;
35
- commands: object;
35
+ commands: JsonObject;
36
36
  };
37
- fromJSON(json: any, force?: boolean): boolean;
37
+ fromJSON(json: JsonObject, force?: boolean): boolean;
38
38
  /**
39
39
  * The {@link id} is the key.
40
40
  */
@@ -1,5 +1,5 @@
1
1
  import { ISerializable } from "../API/Interfaces/ISerializable";
2
- import { datetime } from "../API/Types";
2
+ import { datetime, JsonObject } from "../API/Types";
3
3
  /**
4
4
  * A fragment of data given by a device.
5
5
  */
@@ -8,7 +8,7 @@ export declare class ProviderData implements ISerializable {
8
8
  *
9
9
  * @param json
10
10
  */
11
- static fromJSON(json: any): ProviderData;
11
+ static fromJSON(json: JsonObject): ProviderData;
12
12
  /**
13
13
  * The value of the data given like true, 17.3, "asdf", etc...
14
14
  */
@@ -2,7 +2,7 @@ import { BaseComponent } from "../API/BaseComponent";
2
2
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
3
  import { INamed } from "../API/Interfaces/INamed";
4
4
  import { ISuspendable } from "../API/Interfaces/ISuspendable";
5
- import { phone, ulong } from "../API/Types";
5
+ import { JsonObject, phone, ulong } from "../API/Types";
6
6
  import { Asset } from "../Assets/Asset";
7
7
  import { Company } from "../Companies/Company";
8
8
  import { ProviderConfig } from "./Config/ProviderConfig";
@@ -85,23 +85,31 @@ export declare class ProviderGeneral extends BaseComponent implements INamed, IB
85
85
  */
86
86
  sim: string;
87
87
  toJSON(): {
88
- asset?: number | null | undefined;
89
- password?: string | undefined;
90
- firmware?: string | undefined;
91
- phoneNumber?: number | null | undefined;
92
- information?: object | undefined;
93
- sim?: string | undefined;
94
- suspended?: boolean | undefined;
95
- since?: string | null | undefined;
88
+ suspended: boolean;
89
+ since: string | null;
96
90
  id: string | null;
91
+ v: number[];
97
92
  company: number | null;
98
93
  name: string;
99
94
  notes: string;
100
95
  kind: ProviderType;
101
96
  configuration: number | null;
97
+ } | {
98
+ asset: number | null;
99
+ password: string;
100
+ firmware: string;
101
+ phoneNumber: number | null;
102
+ information: JsonObject;
103
+ sim: string;
104
+ id: string | null;
102
105
  v: number[];
106
+ company: number | null;
107
+ name: string;
108
+ notes: string;
109
+ kind: ProviderType;
110
+ configuration: number | null;
103
111
  };
104
- fromJSON(json: any, force?: boolean): boolean;
112
+ fromJSON(json: JsonObject, force?: boolean): boolean;
105
113
  /**
106
114
  * The {@link id} is the key.
107
115
  */
@@ -1,5 +1,5 @@
1
1
  import { ISerializable } from "../API/Interfaces/ISerializable";
2
- import { uint, ulong } from "../API/Types";
2
+ import { JsonObject, nothing, uint, ulong } from "../API/Types";
3
3
  import { Asset } from "../Assets/Asset";
4
4
  import { AssetAdvanced } from "../Assets/AssetAdvanced";
5
5
  import { AssetGeneral } from "../Assets/AssetGeneral";
@@ -8,10 +8,12 @@ import { AssetGeneral } from "../Assets/AssetGeneral";
8
8
  */
9
9
  export declare class ReportBreakdown implements ISerializable {
10
10
  /**
11
- *
12
- * @param json
11
+ * Instantiates a {@link ReportBreakdown} or one of its subclasses based on the shape of the JSON.
12
+ * Implementation is in {@link ReportBreakdown_fromJSON.ts}
13
+ * @param json The JSON to parse.
14
+ * @returns An instance of a {@link ReportBreakdown} or one of its subclasses.
13
15
  */
14
- static fromJSON(json: any): ReportBreakdown;
16
+ static fromJSON: (json: JsonObject) => ReportBreakdown;
15
17
  /**
16
18
  * The asset to which this event data belongs.
17
19
  */
@@ -36,37 +38,12 @@ export declare class ReportBreakdown implements ISerializable {
36
38
  * Advanced/detailed information used.
37
39
  */
38
40
  advanced: AssetAdvanced | null;
39
- constructor(asset?: ulong, instance?: uint, summaryInstances?: uint[], general?: AssetGeneral | null, advanced?: AssetAdvanced | null);
41
+ constructor(asset: ulong, instance: uint, summaryInstances?: uint[] | nothing, general?: AssetGeneral | nothing, advanced?: AssetAdvanced | nothing);
40
42
  toJSON(): {
41
43
  asset: number | null;
42
44
  instance: number | null;
43
45
  summaryInstances: number[];
44
- general: {
45
- suspended?: boolean | undefined;
46
- since?: string | null | undefined;
47
- references?: object | undefined;
48
- messagingAddress?: string | undefined;
49
- pictures?: number[] | undefined;
50
- id: number | null;
51
- v: number[];
52
- company: number;
53
- kind: import("../Assets/AssetType").AssetType;
54
- name: string;
55
- notes: string;
56
- icon: number;
57
- labels: string[];
58
- } | null;
59
- advanced: {
60
- id: number | null;
61
- v: number[];
62
- company: number;
63
- position: import("../API/Geography/Interfaces").IPosition | null;
64
- odometer: number;
65
- tags: string[];
66
- attributes: object;
67
- providers: string[];
68
- relationships: number[];
69
- places: object;
70
- } | null;
46
+ general: JsonObject | null;
47
+ advanced: JsonObject | null;
71
48
  };
72
49
  }
@@ -1,4 +1,4 @@
1
- import { uint, ulong } from "../API/Types";
1
+ import { nothing, uint, ulong } from "../API/Types";
2
2
  import { AssetAdvanced } from "../Assets/AssetAdvanced";
3
3
  import { AssetGeneral } from "../Assets/AssetGeneral";
4
4
  import { DispatchJob } from "../Dispatch/DispatchJob";
@@ -11,7 +11,7 @@ export declare class ReportBreakdownJob extends ReportBreakdown {
11
11
  * The Job used.
12
12
  */
13
13
  job: DispatchJob;
14
- constructor(job: DispatchJob, asset?: ulong, instance?: uint, summaryInstances?: uint[], general?: AssetGeneral | null, advanced?: AssetAdvanced | null);
14
+ constructor(job: DispatchJob, asset: ulong, instance: uint, summaryInstances?: uint[] | nothing, general?: AssetGeneral | nothing, advanced?: AssetAdvanced | nothing);
15
15
  toJSON(): {
16
16
  job: {
17
17
  id: number | null;
@@ -21,8 +21,8 @@ export declare class ReportBreakdownJob extends ReportBreakdown {
21
21
  created: string | null;
22
22
  name: string;
23
23
  instructions: string;
24
- priority: import("../Dispatch/DispatchJobPriority").DispatchJobPriority;
25
- references: object;
24
+ priority: import("..").DispatchJobPriority;
25
+ references: import("..").JsonObject;
26
26
  labels: string[];
27
27
  tags: string[];
28
28
  forms: number[];
@@ -31,32 +31,7 @@ export declare class ReportBreakdownJob extends ReportBreakdown {
31
31
  asset: number | null;
32
32
  instance: number | null;
33
33
  summaryInstances: number[];
34
- general: {
35
- suspended?: boolean | undefined;
36
- since?: string | null | undefined;
37
- references?: object | undefined;
38
- messagingAddress?: string | undefined;
39
- pictures?: number[] | undefined;
40
- id: number | null;
41
- v: number[];
42
- company: number;
43
- kind: import("../Assets/AssetType").AssetType;
44
- name: string;
45
- notes: string;
46
- icon: number;
47
- labels: string[];
48
- } | null;
49
- advanced: {
50
- id: number | null;
51
- v: number[];
52
- company: number;
53
- position: import("../API/Geography/Interfaces").IPosition | null;
54
- odometer: number;
55
- tags: string[];
56
- attributes: object;
57
- providers: string[];
58
- relationships: number[];
59
- places: object;
60
- } | null;
34
+ general: import("..").JsonObject | null;
35
+ advanced: import("..").JsonObject | null;
61
36
  };
62
37
  }
@@ -1,4 +1,4 @@
1
- import { uint, ulong } from "../API/Types";
1
+ import { nothing, uint, ulong } from "../API/Types";
2
2
  import { AssetAdvanced } from "../Assets/AssetAdvanced";
3
3
  import { AssetGeneral } from "../Assets/AssetGeneral";
4
4
  import { AssetMessage } from "../Messaging/AssetMessage";
@@ -11,17 +11,17 @@ export declare class ReportBreakdownMessage extends ReportBreakdown {
11
11
  * The Message used.
12
12
  */
13
13
  message: AssetMessage;
14
- constructor(message: AssetMessage, asset?: ulong, instance?: uint, summaryInstances?: uint[], general?: AssetGeneral | null, advanced?: AssetAdvanced | null);
14
+ constructor(message: AssetMessage, asset: ulong, instance: uint, summaryInstances?: uint[] | nothing, general?: AssetGeneral | nothing, advanced?: AssetAdvanced | nothing);
15
15
  toJSON(): {
16
16
  message: {
17
- folder: import("../Messaging/MessageFolder").MessageFolder;
17
+ folder: import("..").MessageFolder;
18
18
  incoming: boolean;
19
19
  readBy: string;
20
20
  id: number | null;
21
21
  v: number[];
22
22
  company: number;
23
- kind: import("../Messaging/MessageType").MessageType;
24
- status: import("../Messaging/MessageStatus").MessageStatus;
23
+ status: import("..").MessageStatus;
24
+ kind: import("..").MessageType;
25
25
  to: string;
26
26
  from: string;
27
27
  body: string;
@@ -34,32 +34,7 @@ export declare class ReportBreakdownMessage extends ReportBreakdown {
34
34
  asset: number | null;
35
35
  instance: number | null;
36
36
  summaryInstances: number[];
37
- general: {
38
- suspended?: boolean | undefined;
39
- since?: string | null | undefined;
40
- references?: object | undefined;
41
- messagingAddress?: string | undefined;
42
- pictures?: number[] | undefined;
43
- id: number | null;
44
- v: number[];
45
- company: number;
46
- kind: import("../Assets/AssetType").AssetType;
47
- name: string;
48
- notes: string;
49
- icon: number;
50
- labels: string[];
51
- } | null;
52
- advanced: {
53
- id: number | null;
54
- v: number[];
55
- company: number;
56
- position: import("../API/Geography/Interfaces").IPosition | null;
57
- odometer: number;
58
- tags: string[];
59
- attributes: object;
60
- providers: string[];
61
- relationships: number[];
62
- places: object;
63
- } | null;
37
+ general: import("..").JsonObject | null;
38
+ advanced: import("..").JsonObject | null;
64
39
  };
65
40
  }