@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
@@ -1,4 +1,4 @@
1
- import { byte, ulong } from "../../API/Types";
1
+ import { byte, nothing, ulong } from "../../API/Types";
2
2
  import { FormFieldType } from "../FormFieldType";
3
3
  import { FormFieldBase } from "./FormFieldBase";
4
4
  /**
@@ -9,12 +9,17 @@ export declare class FormFieldChoice extends FormFieldBase {
9
9
  * Splits the given value using commas (so long as the comma did not get escaped).
10
10
  * @param values
11
11
  */
12
- static splitValues(values: string): string[];
12
+ static split(values: string): string[];
13
13
  /**
14
14
  * Replaces all the commas in a given value with backslash-comma.
15
15
  * @param value
16
16
  */
17
- static escapeValue(value: string): string;
17
+ static escape(value: string): string;
18
+ /**
19
+ * Replaces all the commas in a given value with backslash-comma.
20
+ * @param value
21
+ */
22
+ static unescape(value: string): string;
18
23
  /**
19
24
  * Just {@link FormFieldType.choice} control type.
20
25
  */
@@ -31,18 +36,11 @@ export declare class FormFieldChoice extends FormFieldBase {
31
36
  * Maximum number of choices that must be selected.
32
37
  */
33
38
  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);
39
+ constructor(id?: ulong | nothing, name?: string | nothing, kind?: FormFieldType | nothing, choices?: Map<string, string> | nothing, minimum?: byte | nothing, maximum?: byte | nothing, notes?: string | nothing, required?: boolean | nothing, value?: string | nothing, editable?: boolean | nothing);
35
40
  toJSON(): {
36
- choices: object;
41
+ choices: import("../..").JsonObject;
37
42
  minimum: number | null;
38
43
  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
44
  };
47
45
  isValid(value: string): boolean;
48
46
  }
@@ -1,4 +1,4 @@
1
- import { datetime, ulong } from "../../API/Types";
1
+ import { datetime, nothing, ulong } from "../../API/Types";
2
2
  import { FormFieldType } from "../FormFieldType";
3
3
  import { FormFieldBase } from "./FormFieldBase";
4
4
  /**
@@ -17,17 +17,10 @@ export declare class FormFieldDate extends FormFieldBase {
17
17
  * The latest date or date/time.
18
18
  */
19
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);
20
+ constructor(id?: ulong | nothing, name?: string | nothing, kind?: FormFieldType | nothing, minimum?: Date | number | datetime | nothing, maximum?: Date | number | datetime | nothing, notes?: string | nothing, required?: boolean | nothing, value?: string | nothing, editable?: boolean | nothing);
21
21
  toJSON(): {
22
22
  minimum: string | null;
23
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
24
  };
32
25
  isValid(value: string): boolean;
33
26
  }
@@ -1,4 +1,4 @@
1
- import { byte, double, ulong } from "../../API/Types";
1
+ import { byte, double, nothing, ulong } from "../../API/Types";
2
2
  import { FormFieldType } from "../FormFieldType";
3
3
  import { FormFieldBase } from "./FormFieldBase";
4
4
  import { FormFieldNumericSize } from "./FormFieldNumericSize";
@@ -41,7 +41,7 @@ export declare class FormFieldNumeric extends FormFieldBase {
41
41
  * The (optional) maximum value.
42
42
  */
43
43
  maximum: double;
44
- constructor(id?: ulong, name?: string, kind?: FormFieldType, size?: FormFieldNumericSize, precision?: byte, step?: double, units?: string, minimum?: double, maximum?: double, notes?: string, required?: boolean, value?: string | null, editable?: boolean);
44
+ constructor(id?: ulong | nothing, name?: string | nothing, kind?: FormFieldType | nothing, size?: FormFieldNumericSize | nothing, precision?: byte | nothing, step?: double | nothing, units?: string | nothing, minimum?: double | nothing, maximum?: double | nothing, notes?: string | nothing, required?: boolean | nothing, value?: string | nothing, editable?: boolean | nothing);
45
45
  toJSON(): {
46
46
  size: FormFieldNumericSize;
47
47
  precision: number | null;
@@ -49,13 +49,6 @@ export declare class FormFieldNumeric extends FormFieldBase {
49
49
  units: string;
50
50
  minimum: number | null;
51
51
  maximum: number | null;
52
- id: number | null;
53
- kind: FormFieldType;
54
- name: string;
55
- notes: string;
56
- required: boolean;
57
- value: string | null;
58
- editable: boolean;
59
52
  };
60
53
  isValid(value: string): boolean;
61
54
  }
@@ -1,4 +1,4 @@
1
- import { ulong } from '../../API/Types';
1
+ import { nothing, ulong } from '../../API/Types';
2
2
  import { FormFieldType } from '../FormFieldType';
3
3
  import { FormFieldBase } from './FormFieldBase';
4
4
  /**
@@ -12,6 +12,6 @@ export declare class FormFieldSignature extends FormFieldBase {
12
12
  * Just {@link FormFieldType.signature} control type.
13
13
  */
14
14
  protected get supported(): FormFieldType[];
15
- constructor(id?: ulong, name?: string, notes?: string, required?: boolean, value?: string | null, editable?: boolean);
15
+ constructor(id?: ulong | nothing, name?: string | nothing, notes?: string | nothing, required?: boolean | nothing, value?: string | nothing, editable?: boolean | nothing);
16
16
  isValid(value: string): boolean;
17
17
  }
@@ -1,4 +1,4 @@
1
- import { byte, ulong, ushort } from "../../API/Types";
1
+ import { byte, nothing, ulong, ushort } from "../../API/Types";
2
2
  import { FormFieldType } from "../FormFieldType";
3
3
  import { FormFieldBase } from "./FormFieldBase";
4
4
  /**
@@ -22,18 +22,11 @@ export declare class FormFieldText extends FormFieldBase {
22
22
  * Maximum length of entered text to make it a valid entry.
23
23
  */
24
24
  maximum: ushort;
25
- constructor(id?: ulong, name?: string, rows?: byte, minimum?: ushort, maximum?: ushort, notes?: string, required?: boolean, value?: string | null, editable?: boolean);
25
+ constructor(id?: ulong | nothing, name?: string | nothing, rows?: byte | nothing, minimum?: ushort | nothing, maximum?: ushort | nothing, notes?: string | nothing, required?: boolean | nothing, value?: string | nothing, editable?: boolean | nothing);
26
26
  toJSON(): {
27
27
  rows: number | null;
28
28
  minimum: number | null;
29
29
  maximum: number | null;
30
- id: number | null;
31
- kind: FormFieldType;
32
- name: string;
33
- notes: string;
34
- required: boolean;
35
- value: string | null;
36
- editable: boolean;
37
30
  };
38
31
  isValid(value: string): boolean;
39
32
  }
@@ -1,11 +1,21 @@
1
1
  import { TimeSpan } from "../../API/TimeSpan";
2
- import { timespan, ulong } from "../../API/Types";
2
+ import { nothing, timespan, ulong } from "../../API/Types";
3
3
  import { FormFieldType } from "../FormFieldType";
4
4
  import { FormFieldBase } from "./FormFieldBase";
5
5
  /**
6
6
  * A control to choose a time or duration longer than 24 hours.
7
7
  */
8
8
  export declare class FormFieldTime extends FormFieldBase {
9
+ /**
10
+ * For a 24 hour day, anything negative span would be considered invalid.
11
+ * As such, the minimum time for a {@link FormFieldType.time} is midnight (zero).
12
+ */
13
+ static readonly MINIMUM_TIME_OF_DAY: TimeSpan;
14
+ /**
15
+ * For a 24 hour day, anything over a 24 hour span would be considered invalid.
16
+ * As such, the maximum time for a {@link FormFieldType.time} is midnight the next day.
17
+ */
18
+ static readonly MAXIMUM_TIME_OF_DAY: TimeSpan;
9
19
  /**
10
20
  * These are the clock control types.
11
21
  */
@@ -18,17 +28,10 @@ export declare class FormFieldTime extends FormFieldBase {
18
28
  * The maximum duration or latest time-of-day.
19
29
  */
20
30
  maximum: TimeSpan | null;
21
- constructor(id?: ulong, name?: string, kind?: FormFieldType, minimum?: TimeSpan | timespan | number, maximum?: TimeSpan | timespan | number, notes?: string, required?: boolean, value?: string | null, editable?: boolean);
31
+ constructor(id?: ulong | nothing, name?: string | nothing, kind?: FormFieldType | nothing, minimum?: TimeSpan | timespan | number | nothing, maximum?: TimeSpan | timespan | number | nothing, notes?: string | nothing, required?: boolean | nothing, value?: string | nothing, editable?: boolean | nothing);
22
32
  toJSON(): {
23
33
  minimum: string | null;
24
34
  maximum: string | null;
25
- id: number | null;
26
- kind: FormFieldType;
27
- name: string;
28
- notes: string;
29
- required: boolean;
30
- value: string | null;
31
- editable: boolean;
32
35
  };
33
36
  isValid(value: string): boolean;
34
37
  }
@@ -1,4 +1,4 @@
1
- import { ulong } from "../../API/Types";
1
+ import { nothing, ulong } from "../../API/Types";
2
2
  import { FormFieldType } from "../FormFieldType";
3
3
  import { FormFieldBase } from "./FormFieldBase";
4
4
  /**
@@ -9,6 +9,6 @@ export declare class FormFieldTimezone extends FormFieldBase {
9
9
  * Just {@link FormFieldType.timezone} control type.
10
10
  */
11
11
  protected get supported(): FormFieldType[];
12
- constructor(id?: ulong, name?: string, notes?: string, required?: boolean, value?: string | null, editable?: boolean);
12
+ constructor(id?: ulong | nothing, name?: string | nothing, notes?: string | nothing, required?: boolean | nothing, value?: string | nothing, editable?: boolean | nothing);
13
13
  isValid(value: string): boolean;
14
14
  }
@@ -5,7 +5,7 @@ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
5
5
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
6
6
  import { ILabelled } from "../API/Interfaces/ILabelled";
7
7
  import { INamed } from "../API/Interfaces/INamed";
8
- import { codified, ulong } from "../API/Types";
8
+ import { codified, ulong, JsonObject } from "../API/Types";
9
9
  import { Asset } from "../Assets/Asset";
10
10
  import { Company } from "../Companies/Company";
11
11
  import { FormTemplate } from "./FormTemplate";
@@ -78,7 +78,7 @@ export declare class FormResult extends BaseComponent implements IIdUlong, IName
78
78
  /**
79
79
  * The {@link id} is the key.
80
80
  */
81
- getKey(): string;
81
+ getKey(): number;
82
82
  toJSON(): {
83
83
  id: number;
84
84
  company: number;
@@ -88,10 +88,10 @@ export declare class FormResult extends BaseComponent implements IIdUlong, IName
88
88
  name: string;
89
89
  notes: string;
90
90
  labels: string[];
91
- fields: object;
91
+ fields: JsonObject;
92
92
  completed: string | null;
93
93
  latlng: import("../API/Geography/Interfaces").ILatLng | null;
94
94
  driver: string | null;
95
95
  };
96
- fromJSON(json: any, force?: boolean): boolean;
96
+ fromJSON(json: JsonObject, force?: boolean): boolean;
97
97
  }
@@ -4,7 +4,7 @@ import { IIdUlong } from "../API/Interfaces/IIdUlong";
4
4
  import { ILabelled } from "../API/Interfaces/ILabelled";
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 { codified, colour, ulong, JsonObject } from "../API/Types";
8
8
  import { Company } from "../Companies/Company";
9
9
  import { FormFieldAttachments } from './Fields/FormFieldAttachments';
10
10
  import { FormFieldBoolean } from './Fields/FormFieldBoolean';
@@ -64,7 +64,7 @@ export declare class FormTemplate extends BaseComponent implements IIdUlong, INa
64
64
  /**
65
65
  * The {@link id} is the key.
66
66
  */
67
- getKey(): string;
67
+ getKey(): number;
68
68
  toJSON(): {
69
69
  id: number | null;
70
70
  company: number | null;
@@ -77,5 +77,5 @@ export declare class FormTemplate extends BaseComponent implements IIdUlong, INa
77
77
  stroke: string;
78
78
  graphic: string;
79
79
  };
80
- fromJSON(json: any, force?: boolean): boolean;
80
+ fromJSON(json: JsonObject, force?: boolean): boolean;
81
81
  }
@@ -1,7 +1,7 @@
1
1
  import { ISize } from "../API/Geometry/Interfaces";
2
2
  import { Size } from "../API/Geometry/Size";
3
3
  import { TimeSpan } from "../API/TimeSpan";
4
- import { byte, datetime, double, guid, single, ulong } from "../API/Types";
4
+ import { byte, datetime, double, guid, JsonObject, single, ulong } from "../API/Types";
5
5
  import { DashcamBase } from "./DashcamBase";
6
6
  import { DashcamMediaType } from "./DashcamMediaType";
7
7
  /**
@@ -12,7 +12,7 @@ export declare class Dashcam extends DashcamBase {
12
12
  *
13
13
  * @param json
14
14
  */
15
- static fromJSON(json: any): Dashcam;
15
+ static fromJSON(json: JsonObject): Dashcam;
16
16
  /**
17
17
  * Unique identifier of this resource.
18
18
  */
@@ -43,7 +43,7 @@ export declare class Dashcam extends DashcamBase {
43
43
  * The reason why we're saving this image/video. Or the event name that triggered it.
44
44
  */
45
45
  eventName: string;
46
- constructor(bytes?: ulong, size?: Size | ISize, provider?: string, company?: ulong, asset?: ulong, camera?: byte, latitude?: double, longitude?: double, speed?: double, heading?: double, altitude?: double, guid?: guid, kind?: DashcamMediaType, fps?: single, start?: Date | number | datetime, end?: Date | number | datetime, eventName?: string);
46
+ constructor(bytes?: ulong, size?: Size | ISize | JsonObject, provider?: string, company?: ulong, asset?: ulong, camera?: byte, latitude?: double, longitude?: double, speed?: double, heading?: double, altitude?: double, guid?: guid, kind?: DashcamMediaType, fps?: single, start?: Date | number | datetime, end?: Date | number | datetime, eventName?: string);
47
47
  toJSON(): {
48
48
  guid: string;
49
49
  kind: DashcamMediaType;
@@ -3,7 +3,7 @@ import { Size } from "../API/Geometry/Size";
3
3
  import { IFileSize } from "../API/Interfaces/IFileSize";
4
4
  import { IRequestable } from "../API/Interfaces/IRequestable";
5
5
  import { ISerializable } from "../API/Interfaces/ISerializable";
6
- import { byte, double, ulong } from "../API/Types";
6
+ import { byte, double, ulong, JsonObject } from "../API/Types";
7
7
  import { Asset } from "../Assets/Asset";
8
8
  import { Company } from "../Companies/Company";
9
9
  import { Provider } from "../Providers/Provider";
@@ -73,7 +73,7 @@ export declare abstract class DashcamBase implements IRequestable, IFileSize, IS
73
73
  * Altitude of the start of the resource.
74
74
  */
75
75
  altitude: double;
76
- constructor(bytes?: ulong, size?: Size | ISize, provider?: string, company?: ulong, asset?: ulong, camera?: byte, latitude?: double, longitude?: double, speed?: double, heading?: double, altitude?: double);
76
+ constructor(bytes?: ulong, size?: Size | ISize | JsonObject, provider?: string, company?: ulong, asset?: ulong, camera?: byte, latitude?: double, longitude?: double, speed?: double, heading?: double, altitude?: double);
77
77
  /**
78
78
  *
79
79
  */
@@ -1,6 +1,6 @@
1
1
  import { ISize } from "../API/Geometry/Interfaces";
2
2
  import { Size } from "../API/Geometry/Size";
3
- import { byte, double, ulong } from "../API/Types";
3
+ import { byte, double, JsonObject, ulong } from "../API/Types";
4
4
  import { DashcamBase } from "./DashcamBase";
5
5
  import { DashcamMediaType } from "./DashcamMediaType";
6
6
  /**
@@ -11,7 +11,7 @@ export declare class DashcamLive extends DashcamBase {
11
11
  *
12
12
  * @param json
13
13
  */
14
- static fromJSON(json: any): DashcamLive;
14
+ static fromJSON(json: JsonObject): DashcamLive;
15
15
  /**
16
16
  * The type of data being stored.
17
17
  */
@@ -20,7 +20,7 @@ export declare class DashcamLive extends DashcamBase {
20
20
  * Timestamp of this live camera image.
21
21
  */
22
22
  dts: Date;
23
- constructor(bytes?: ulong, size?: Size | ISize, provider?: string, company?: ulong, asset?: ulong, camera?: byte, latitude?: double, longitude?: double, speed?: double, heading?: double, altitude?: double, dts?: Date | string | number);
23
+ constructor(bytes?: ulong, size?: Size | ISize | JsonObject, provider?: string, company?: ulong, asset?: ulong, camera?: byte, latitude?: double, longitude?: double, speed?: double, heading?: double, altitude?: double, dts?: Date | string | number);
24
24
  toJSON(): {
25
25
  kind: DashcamMediaType;
26
26
  dts: string | null;
package/Images/Icon.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { BaseComponent } from "../API/BaseComponent";
2
- import { ulong } from "../API/Types";
3
- import { IconLabel } from "./IconLabel";
4
- import { IconGlyph } from "./IconGlyph";
2
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
5
3
  import { IGlobal } from "../API/Interfaces/IGlobal";
6
4
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
7
5
  import { INamed } from "../API/Interfaces/INamed";
8
- import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
6
+ import { JsonObject, ulong } from "../API/Types";
9
7
  import { Company } from "../Companies/Company";
8
+ import { IconGlyph } from "./IconGlyph";
9
+ import { IconLabel } from "./IconLabel";
10
10
  /**
11
11
  * A visual representation of a thing on a map or in a list.
12
12
  */
@@ -58,30 +58,10 @@ export declare class Icon extends BaseComponent implements IIdUlong, INamed, IBe
58
58
  * The images used to show the detail of this icon.
59
59
  */
60
60
  glyphs: IconGlyph[];
61
- toJSON(): {
62
- id: number | null;
63
- v: number[];
64
- company: number;
65
- category: string;
66
- name: string;
67
- notes: string;
68
- global: boolean;
69
- usage: string[];
70
- label: {
71
- align: string;
72
- anchor: import("../API/Geometry/Interfaces").IPoint;
73
- colour: string;
74
- };
75
- badge: {
76
- align: string;
77
- anchor: import("../API/Geometry/Interfaces").IPoint;
78
- colour: string;
79
- };
80
- glyphs: any[];
81
- };
82
- fromJSON(json: any, force?: boolean): boolean;
61
+ toJSON(): JsonObject;
62
+ fromJSON(json: JsonObject, force?: boolean): boolean;
83
63
  /**
84
64
  * The {@link id} is the key.
85
65
  */
86
- getKey(): string;
66
+ getKey(): number;
87
67
  }
@@ -2,7 +2,7 @@ import { IPoint, ISize } from "../API/Geometry/Interfaces";
2
2
  import { Point } from "../API/Geometry/Point";
3
3
  import { Size } from "../API/Geometry/Size";
4
4
  import { ISerializable } from "../API/Interfaces/ISerializable";
5
- import { codified, ushort } from "../API/Types";
5
+ import { codified, ushort, JsonObject } from "../API/Types";
6
6
  import { IconLayer } from "./IconLayer";
7
7
  /**
8
8
  * The image source and defined status tags which need to be applied to an asset in order to show the image.
@@ -12,7 +12,7 @@ export declare class IconGlyph implements ISerializable {
12
12
  *
13
13
  * @param json
14
14
  */
15
- static fromJSON(json: any): IconGlyph;
15
+ static fromJSON(json: JsonObject): IconGlyph;
16
16
  /**
17
17
  * A list of codified status tag names. Any of the tags must be applied to the asset for the image to appear.
18
18
  */
@@ -41,14 +41,7 @@ export declare class IconGlyph implements ISerializable {
41
41
  * Indicates that this glyph rotate based on GPS bearing.
42
42
  */
43
43
  rotates: boolean;
44
- constructor(tags?: codified[], src?: string, size?: ISize, anchor?: IPoint, layer?: IconLayer, zIndex?: ushort, rotates?: boolean);
45
- toJSON(): {
46
- tags: string[];
47
- src: string;
48
- size: ISize;
49
- anchor: IPoint;
50
- layer: IconLayer;
51
- zIndex: number | null;
52
- rotates: boolean;
53
- };
44
+ constructor(tags?: codified[], src?: string, size?: ISize | JsonObject, anchor?: IPoint | JsonObject, layer?: IconLayer, zIndex?: ushort, rotates?: boolean);
45
+ toJSON(): JsonObject;
46
+ isEqual(other: IconGlyph): boolean;
54
47
  }
@@ -1,7 +1,7 @@
1
1
  import { IPoint } from "../API/Geometry/Interfaces";
2
2
  import { Point } from "../API/Geometry/Point";
3
3
  import { ISerializable } from "../API/Interfaces/ISerializable";
4
- import { colour } from "../API/Types";
4
+ import { colour, JsonObject } from "../API/Types";
5
5
  /**
6
6
  * Definition for the name bubble above the icon on a map.
7
7
  */
@@ -10,7 +10,7 @@ export declare class IconLabel implements ISerializable {
10
10
  *
11
11
  * @param json
12
12
  */
13
- static fromJSON(json: any): IconLabel;
13
+ static fromJSON(json: JsonObject): IconLabel;
14
14
  /**
15
15
  * The offset from the lat/long in pixels.
16
16
  */
@@ -23,10 +23,7 @@ export declare class IconLabel implements ISerializable {
23
23
  * Background colour of the label.
24
24
  */
25
25
  colour: colour;
26
- constructor(anchor?: IPoint, align?: string, colour?: colour);
27
- toJSON(): {
28
- align: string;
29
- anchor: IPoint;
30
- colour: string;
31
- };
26
+ constructor(anchor?: IPoint | JsonObject, align?: string, colour?: colour);
27
+ toJSON(): JsonObject;
28
+ isEqual(other: IconLabel): boolean;
32
29
  }
@@ -5,7 +5,7 @@ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
5
5
  import { IFileSize } from "../API/Interfaces/IFileSize";
6
6
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
7
7
  import { INamed } from "../API/Interfaces/INamed";
8
- import { uint, ulong } from "../API/Types";
8
+ import { uint, ulong, JsonObject } from "../API/Types";
9
9
  import { Company } from "../Companies/Company";
10
10
  /**
11
11
  * An image stored by the system.
@@ -65,9 +65,9 @@ export declare class Picture extends BaseComponent implements IIdUlong, INamed,
65
65
  bytes: number | null;
66
66
  uses: number | null;
67
67
  };
68
- fromJSON(json: any, force?: boolean): boolean;
68
+ fromJSON(json: JsonObject, force?: boolean): boolean;
69
69
  /**
70
70
  * The {@link id} is the key.
71
71
  */
72
- getKey(): string;
72
+ getKey(): number;
73
73
  }
@@ -1,13 +1,13 @@
1
1
  import { IBelongAsset } from "../API/Interfaces/IBelongAsset";
2
2
  import { ISerializable } from "../API/Interfaces/ISerializable";
3
- import { datetime, double, ulong } from "../API/Types";
3
+ import { datetime, double, JsonObject, ulong } from "../API/Types";
4
4
  import { Asset } from "../Assets/Asset";
5
5
  import { MaintenanceJob } from "./MaintenanceJob";
6
6
  /**
7
7
  * The detail for calculating Maintenance Schedule recurrence.
8
8
  */
9
9
  export declare class MaintenanceInterval implements IBelongAsset, ISerializable {
10
- static fromJSON(json: any): MaintenanceInterval;
10
+ static fromJSON(json: JsonObject): MaintenanceInterval;
11
11
  /**
12
12
  * The Vehicle or Trailer to which this recurrence detail belongs.
13
13
  * {@link Asset.id}
@@ -5,7 +5,7 @@ import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
5
  import { INamed } from "../API/Interfaces/INamed";
6
6
  import { IPictured } from "../API/Interfaces/IPictured";
7
7
  import { TimeSpan } from "../API/TimeSpan";
8
- import { double, ulong } from "../API/Types";
8
+ import { double, JsonObject, ulong } from "../API/Types";
9
9
  import { Asset } from "../Assets/Asset";
10
10
  import { Company } from "../Companies/Company";
11
11
  import { Picture } from "../Images/Picture";
@@ -129,9 +129,9 @@ export declare class MaintenanceJob extends BaseComponent implements IIdUlong, I
129
129
  technician: string;
130
130
  pictures: number[];
131
131
  };
132
- fromJSON(json: any, force?: boolean): boolean;
132
+ fromJSON(json: JsonObject, force?: boolean): boolean;
133
133
  /**
134
134
  * The {@link id} is the key.
135
135
  */
136
- getKey(): string;
136
+ getKey(): number;
137
137
  }
@@ -5,7 +5,7 @@ import { INamed } from "../API/Interfaces/INamed";
5
5
  import { IVisual } from "../API/Interfaces/IVisual";
6
6
  import { SearchPattern } from "../API/SearchPattern";
7
7
  import { TimeSpan } from "../API/TimeSpan";
8
- import { codified, colour, double, email, uint, ulong } from "../API/Types";
8
+ import { codified, colour, double, email, JsonObject, uint, ulong } from "../API/Types";
9
9
  import { Company } from "../Companies/Company";
10
10
  import { MaintenanceInterval } from "./MaintenanceInterval";
11
11
  /**
@@ -109,11 +109,11 @@ export declare class MaintenanceSchedule extends BaseComponent implements IIdUlo
109
109
  recurDays: number | null;
110
110
  recurDistance: number | null;
111
111
  recurEngineHours: number | null;
112
- intervals: object;
112
+ intervals: JsonObject;
113
113
  };
114
- fromJSON(json: any, force?: boolean): boolean;
114
+ fromJSON(json: JsonObject, force?: boolean): boolean;
115
115
  /**
116
116
  * The {@link id} is the key.
117
117
  */
118
- getKey(): string;
118
+ getKey(): number;
119
119
  }
@@ -1,3 +1,4 @@
1
+ import { JsonObject } from '../API/Types';
1
2
  import { AlertPriority } from './AlertPriority';
2
3
  import { MessageBase } from './MessageBase';
3
4
  /**
@@ -24,5 +25,5 @@ export declare class AssetAlert extends MessageBase {
24
25
  asset: number;
25
26
  user: string;
26
27
  };
27
- fromJSON(json: any, force?: boolean): boolean;
28
+ fromJSON(json: JsonObject, force?: boolean): boolean;
28
29
  }
@@ -1,4 +1,4 @@
1
- import { email } from '../API/Types';
1
+ import { email, JsonObject } from '../API/Types';
2
2
  import { MessageBase } from './MessageBase';
3
3
  import { MessageFolder } from './MessageFolder';
4
4
  /**
@@ -36,5 +36,5 @@ export declare class AssetMessage extends MessageBase {
36
36
  asset: number;
37
37
  user: string;
38
38
  };
39
- fromJSON(json: any, force?: boolean): boolean;
39
+ fromJSON(json: JsonObject, force?: boolean): boolean;
40
40
  }
@@ -3,7 +3,7 @@ import { BaseComponent } from "../API/BaseComponent";
3
3
  import { IBelongAsset } from "../API/Interfaces/IBelongAsset";
4
4
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
5
5
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
6
- import { email, ulong } from "../API/Types";
6
+ import { email, JsonObject, ulong } from "../API/Types";
7
7
  import { Asset } from "../Assets/Asset";
8
8
  import { Company } from "../Companies/Company";
9
9
  import { MessageStatus } from './MessageStatus';
@@ -93,9 +93,9 @@ export declare abstract class MessageBase extends BaseComponent implements IIdUl
93
93
  asset: number;
94
94
  user: string;
95
95
  };
96
- fromJSON(json: any, force?: boolean): boolean;
96
+ fromJSON(json: JsonObject, force?: boolean): boolean;
97
97
  /**
98
98
  * The {@link id} is the key.
99
99
  */
100
- getKey(): string;
100
+ getKey(): number;
101
101
  }
package/Places/Place.d.ts CHANGED
@@ -6,7 +6,7 @@ import { IIdUlong } from "../API/Interfaces/IIdUlong";
6
6
  import { ILabelled } from "../API/Interfaces/ILabelled";
7
7
  import { INamed } from "../API/Interfaces/INamed";
8
8
  import { IPictured } from "../API/Interfaces/IPictured";
9
- import { codified, colour, double, ulong } from "../API/Types";
9
+ import { JsonObject, codified, colour, double, ulong } from "../API/Types";
10
10
  import { Company } from "../Companies/Company";
11
11
  import { Icon } from "../Images/Icon";
12
12
  import { Picture } from "../Images/Picture";
@@ -106,11 +106,11 @@ export declare class Place extends BaseComponent implements IIdUlong, INamed, II
106
106
  reference: string;
107
107
  anchor: import("../API/Geography/Interfaces").ILatLng | null;
108
108
  radius: number | null;
109
- shape: any[] | null;
109
+ shape: string | null;
110
110
  };
111
- fromJSON(json: any, force?: boolean): boolean;
111
+ fromJSON(json: JsonObject, force?: boolean): boolean;
112
112
  /**
113
113
  * The {@link id} is the key.
114
114
  */
115
- getKey(): string;
115
+ getKey(): number;
116
116
  }
@@ -3,7 +3,7 @@ import { IBelongCompany } from "../../API/Interfaces/IBelongCompany";
3
3
  import { IIdUlong } from "../../API/Interfaces/IIdUlong";
4
4
  import { INamed } from "../../API/Interfaces/INamed";
5
5
  import { SearchPattern } from "../../API/SearchPattern";
6
- import { ulong } from "../../API/Types";
6
+ import { JsonObject, ulong } from "../../API/Types";
7
7
  import { Company } from "../../Companies/Company";
8
8
  import { ProviderScript } from "./ProviderScript";
9
9
  /**
@@ -61,12 +61,12 @@ export declare class ProviderConfig extends BaseComponent implements IIdUlong, I
61
61
  script: number | null;
62
62
  name: string;
63
63
  notes: string;
64
- parameters: object;
64
+ parameters: JsonObject;
65
65
  geofences: string | null;
66
66
  };
67
- fromJSON(json: any, force?: boolean): boolean;
67
+ fromJSON(json: JsonObject, force?: boolean): boolean;
68
68
  /**
69
69
  * The {@link id} is the key.
70
70
  */
71
- getKey(): string;
71
+ getKey(): number;
72
72
  }