@trakit/objects 0.0.13 → 0.0.15

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 (61) hide show
  1. package/API/Base.d.ts +1 -6
  2. package/Accounts/Contact.d.ts +2 -1
  3. package/Accounts/Machine.d.ts +2 -1
  4. package/Accounts/Session.d.ts +1 -16
  5. package/Accounts/User.d.ts +2 -24
  6. package/Accounts/UserAdvanced.d.ts +2 -1
  7. package/Accounts/UserAuthentication.d.ts +2 -1
  8. package/Accounts/UserGeneral.d.ts +2 -1
  9. package/Accounts/UserGroup.d.ts +2 -1
  10. package/Assets/Asset.d.ts +34 -2
  11. package/Assets/AssetAdvanced.d.ts +2 -1
  12. package/Assets/AssetDispatch.d.ts +18 -2
  13. package/Assets/AssetGeneral.d.ts +34 -2
  14. package/Behaviours/Behaviour.d.ts +1 -0
  15. package/Behaviours/BehaviourLog.d.ts +1 -0
  16. package/Behaviours/BehaviourScript.d.ts +1 -0
  17. package/Billing/BillingProfile.d.ts +1 -0
  18. package/Billing/Hosting/BillableHostingLicense.d.ts +1 -0
  19. package/Billing/Hosting/BillableHostingRule.d.ts +1 -0
  20. package/Billing/Report/BillingReport.d.ts +1 -0
  21. package/Companies/Company.d.ts +2 -4
  22. package/Companies/CompanyDirectory.d.ts +2 -9
  23. package/Companies/CompanyGeneral.d.ts +2 -1
  24. package/Companies/CompanyPolicy.d.ts +2 -1
  25. package/Companies/CompanyReseller.d.ts +2 -1
  26. package/Companies/CompanyStyle.d.ts +2 -1
  27. package/Dispatch/DispatchJob.d.ts +2 -1
  28. package/Dispatch/DispatchTask.d.ts +1 -0
  29. package/Hosting/Document.d.ts +2 -1
  30. package/Hosting/FormResult.d.ts +2 -1
  31. package/Hosting/FormTemplate.d.ts +2 -1
  32. package/Images/Dashcam.d.ts +3 -2
  33. package/Images/DashcamLive.d.ts +3 -2
  34. package/Images/Icon.d.ts +15 -2
  35. package/Images/Picture.d.ts +2 -1
  36. package/Maintenance/MaintenanceJob.d.ts +2 -1
  37. package/Maintenance/MaintenanceSchedule.d.ts +2 -1
  38. package/Messaging/AssetAlert.d.ts +2 -1
  39. package/Messaging/AssetMessage.d.ts +2 -1
  40. package/Places/Place.d.ts +2 -1
  41. package/Providers/Config/ProviderConfig.d.ts +2 -1
  42. package/Providers/Config/ProviderRegistration.d.ts +2 -1
  43. package/Providers/Config/ProviderScript.d.ts +2 -1
  44. package/Providers/Configuration/ProviderConfiguration.d.ts +2 -1
  45. package/Providers/Configuration/ProviderConfigurationType.d.ts +2 -1
  46. package/Providers/Provider.d.ts +2 -1
  47. package/Providers/ProviderAdvanced.d.ts +2 -1
  48. package/Providers/ProviderControl.d.ts +2 -1
  49. package/Providers/ProviderGeneral.d.ts +2 -1
  50. package/Reports/ReportBreakdown.d.ts +32 -1
  51. package/Reports/ReportBreakdownJob.d.ts +32 -1
  52. package/Reports/ReportBreakdownMessage.d.ts +32 -1
  53. package/Reports/ReportBreakdownTask.d.ts +32 -1
  54. package/Reports/ReportResult.d.ts +2 -1
  55. package/Reports/ReportSchedule.d.ts +2 -1
  56. package/Reports/ReportSummary.d.ts +64 -2
  57. package/Reports/ReportTemplate.d.ts +2 -1
  58. package/index.d.ts +1 -1
  59. package/package.json +1 -1
  60. package/trakit-objects.min.js +2 -2
  61. package/index.js +0 -1
package/API/Base.d.ts CHANGED
@@ -1,14 +1,9 @@
1
1
  import { IDeserializable } from './Interfaces/IDeserializable';
2
- import { JsonObject, nothing } from './Types';
2
+ import { JsonObject } from './Types';
3
3
  /**
4
4
  * A base class used to construct objects from the sync system.
5
5
  */
6
6
  export declare abstract class Base implements IDeserializable {
7
- /**
8
- * Almost all objects can be constructed using a simple JSON object.
9
- * @param json
10
- */
11
- constructor(json?: JsonObject | nothing);
12
7
  /**
13
8
  * Updates this class from the given input.
14
9
  * @param json A JSON value used to update this class.
@@ -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 { IPictured } from "../API/Interfaces/IPictured";
6
- import { codified, email, JsonObject, phone, ulong, url } from "../API/Types";
6
+ import { codified, email, JsonObject, nothing, phone, ulong, url } from "../API/Types";
7
7
  import { Company } from "../Companies/Company";
8
8
  import { Picture } from "../Images/Picture";
9
9
  /**
@@ -115,6 +115,7 @@ export declare class Contact extends BaseComponent implements IIdUlong, INamed,
115
115
  */
116
116
  get url(): url;
117
117
  set url(value: url);
118
+ constructor(json?: JsonObject | nothing);
118
119
  toJSON(): {
119
120
  id: number | null;
120
121
  v: number[];
@@ -4,7 +4,7 @@ import { IEnabled } from '../API/Interfaces/IEnabled';
4
4
  import { IHavePermissions } from '../API/Interfaces/IHavePermissions';
5
5
  import { IHavePreferences } from '../API/Interfaces/IHavePreferences';
6
6
  import { Timezone } from '../API/Timezone';
7
- import { codified, ipv4, JsonObject, ulong, url } from '../API/Types';
7
+ import { codified, ipv4, JsonObject, nothing, ulong, url } from '../API/Types';
8
8
  import { Company } from '../Companies/Company';
9
9
  import { Permission } from './Permissions/Permission';
10
10
  import { SystemsOfUnits } from './SystemsOfUnits';
@@ -102,6 +102,7 @@ export declare class Machine extends BaseComponent implements IEnabled, IBelongC
102
102
  * When true, no access restrictions ({@link secret}, {@link referrers}, or {@link ipRanges}) are enforced.
103
103
  */
104
104
  insecure: boolean;
105
+ constructor(json?: JsonObject | nothing);
105
106
  toJSON(): {
106
107
  key: string;
107
108
  v: number[];
@@ -65,23 +65,8 @@ export declare class Session implements IBelongCompany, IRequestable, ISerializa
65
65
  */
66
66
  get active(): boolean;
67
67
  constructor(json?: JsonObject | nothing);
68
+ toJSON(): JsonObject;
68
69
  fromJSON(json: JsonObject, force?: boolean): boolean;
69
- /**
70
- *
71
- */
72
- toJSON(): {
73
- handle: string;
74
- company: number | null;
75
- login: string;
76
- status: SessionStatus;
77
- userAgent: string;
78
- ipAddress: string;
79
- created: string;
80
- expires: string;
81
- lastActivity: string;
82
- lastCommand: string;
83
- sockets: number;
84
- };
85
70
  /**
86
71
  * The {@link handle} is the key.
87
72
  */
@@ -137,30 +137,8 @@ export declare class User extends BaseCompound implements IEnabled, IBelongCompa
137
137
  */
138
138
  get sso(): UserSSO;
139
139
  set sso(value: UserSSO);
140
- toJSON(): {
141
- v: number[];
142
- login: string;
143
- company: number;
144
- passwordExpired: boolean;
145
- mfa: any[];
146
- sso: {
147
- enabled: boolean;
148
- provider: import("./SSOIdentityProvider").SSOIdentityProvider;
149
- lastAuthentication: string | null;
150
- externalId: string | null;
151
- };
152
- groups: number[];
153
- permissions: any[];
154
- nickname: string;
155
- enabled: boolean;
156
- contact: boolean;
157
- timezone: string;
158
- language: string;
159
- formats: JsonObject;
160
- measurements: JsonObject;
161
- options: JsonObject;
162
- notify: any[];
163
- };
140
+ constructor(json?: JsonObject | nothing);
141
+ toJSON(): any;
164
142
  fromJSON(json: JsonObject, force?: boolean): boolean;
165
143
  /**
166
144
  * The {@link login} is the key.
@@ -1,7 +1,7 @@
1
1
  import { BaseComponent } from "../API/BaseComponent";
2
2
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
3
  import { IHavePermissions } from "../API/Interfaces/IHavePermissions";
4
- import { email, JsonObject, ulong } from "../API/Types";
4
+ import { email, JsonObject, nothing, ulong } from "../API/Types";
5
5
  import { Company } from "../Companies/Company";
6
6
  import { Permission } from "./Permissions/Permission";
7
7
  import { UserGroup } from "./UserGroup";
@@ -38,6 +38,7 @@ export declare class UserAdvanced extends BaseComponent implements IBelongCompan
38
38
  * Individual permission rules which override the group rules.
39
39
  */
40
40
  permissions: Permission[];
41
+ constructor(json?: JsonObject | nothing);
41
42
  toJSON(): {
42
43
  login: string;
43
44
  v: number[];
@@ -1,6 +1,6 @@
1
1
  import { BaseComponent } from "../API/BaseComponent";
2
2
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
- import { JsonObject, email, ulong } from "../API/Types";
3
+ import { JsonObject, email, nothing, ulong } from "../API/Types";
4
4
  import { Company } from "../Companies/Company";
5
5
  import { UserMFA } from "./UserMFA";
6
6
  import { UserSSO } from "./UserSSO";
@@ -34,6 +34,7 @@ export declare class UserAuthentication extends BaseComponent implements IBelong
34
34
  * Single Sign-On details for the user.
35
35
  */
36
36
  sso: UserSSO;
37
+ constructor(json?: JsonObject | nothing);
37
38
  toJSON(): {
38
39
  login: string;
39
40
  v: number[];
@@ -3,7 +3,7 @@ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
3
  import { IEnabled } from "../API/Interfaces/IEnabled";
4
4
  import { IHavePreferences } from "../API/Interfaces/IHavePreferences";
5
5
  import { Timezone } from "../API/Timezone";
6
- import { JsonObject, codified, datetimetemplate, email, ulong } from "../API/Types";
6
+ import { JsonObject, codified, datetimetemplate, email, nothing, ulong } from "../API/Types";
7
7
  import { Company } from "../Companies/Company";
8
8
  import { Contact } from "./Contact";
9
9
  import { SystemsOfUnits } from "./SystemsOfUnits";
@@ -75,6 +75,7 @@ export declare class UserGeneral extends BaseComponent implements IEnabled, IBel
75
75
  * Definition of how and when to send alerts to the user.
76
76
  */
77
77
  notify: UserNotifications[];
78
+ constructor(json?: JsonObject | nothing);
78
79
  toJSON(): {
79
80
  login: string;
80
81
  v: number[];
@@ -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 { JsonObject, ulong } from "../API/Types";
5
+ import { JsonObject, nothing, ulong } from "../API/Types";
6
6
  import { Company } from "../Companies/Company";
7
7
  import { Permission } from "./Permissions/Permission";
8
8
  /**
@@ -35,6 +35,7 @@ export declare class UserGroup extends BaseComponent implements IIdUlong, INamed
35
35
  * Permissions for this group.
36
36
  */
37
37
  permissions: Permission[];
38
+ constructor(json?: JsonObject | nothing);
38
39
  toJSON(): {
39
40
  id: number;
40
41
  v: number[];
package/Assets/Asset.d.ts CHANGED
@@ -9,7 +9,7 @@ import { ILabelled } from "../API/Interfaces/ILabelled";
9
9
  import { INamed } from "../API/Interfaces/INamed";
10
10
  import { IPictured } from "../API/Interfaces/IPictured";
11
11
  import { ISuspendable } from "../API/Interfaces/ISuspendable";
12
- import { JsonObject, codified, colour, double, ulong, ushort } from "../API/Types";
12
+ import { JsonObject, codified, colour, double, nothing, ulong, ushort } from "../API/Types";
13
13
  import { Company } from "../Companies/Company";
14
14
  import { Icon } from "../Images/Icon";
15
15
  import { Picture } from "../Images/Picture";
@@ -203,7 +203,39 @@ export declare class Asset extends BaseCompound implements IIdUlong, INamed, IIc
203
203
  *
204
204
  */
205
205
  get dispatch(): AssetDispatch;
206
- toJSON(): JsonObject;
206
+ constructor(json?: JsonObject | nothing);
207
+ toJSON(): {
208
+ suspended: boolean;
209
+ since: string | null;
210
+ id: number | null;
211
+ v: number[];
212
+ company: number;
213
+ kind: AssetType;
214
+ name: string;
215
+ notes: string;
216
+ icon: number;
217
+ labels: string[];
218
+ } | {
219
+ references: JsonObject;
220
+ messagingAddress: string;
221
+ pictures: number[];
222
+ contact: number;
223
+ vin: string;
224
+ plate: string;
225
+ make: string;
226
+ model: string;
227
+ year: number | null;
228
+ colour: string;
229
+ serial: string;
230
+ id: number | null;
231
+ v: number[];
232
+ company: number;
233
+ kind: AssetType;
234
+ name: string;
235
+ notes: string;
236
+ icon: number;
237
+ labels: string[];
238
+ };
207
239
  fromJSON(json: JsonObject, force?: boolean): boolean;
208
240
  /**
209
241
  * The {@link id} is the key.
@@ -2,7 +2,7 @@ import { BaseComponent } from "../API/BaseComponent";
2
2
  import { Position } from "../API/Geography/Position";
3
3
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
4
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
- import { JsonObject, codified, double, ulong } from "../API/Types";
5
+ import { JsonObject, codified, double, nothing, ulong } from "../API/Types";
6
6
  import { Company } from "../Companies/Company";
7
7
  import { Provider } from "../Providers/Provider";
8
8
  import { Asset } from "./Asset";
@@ -68,6 +68,7 @@ export declare class AssetAdvanced extends BaseComponent implements IIdUlong, IB
68
68
  * The cumulative duration that the vehicle's engine has been running (in decimal hours).
69
69
  */
70
70
  engineHours: double;
71
+ constructor(json?: JsonObject | nothing);
71
72
  toJSON(): JsonObject;
72
73
  fromJSON(json: JsonObject, force?: boolean): boolean;
73
74
  /**
@@ -1,7 +1,7 @@
1
1
  import { BaseComponent } from "../API/BaseComponent";
2
2
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
3
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
4
- import { JsonObject, ulong } from "../API/Types";
4
+ import { JsonObject, nothing, ulong } from "../API/Types";
5
5
  import { Company } from "../Companies/Company";
6
6
  import { DispatchDirection } from "../Dispatch/DispatchDirection";
7
7
  import { DispatchJob } from "../Dispatch/DispatchJob";
@@ -46,7 +46,23 @@ export declare class AssetDispatch extends BaseComponent implements IIdUlong, IB
46
46
  * Timestamp from the last update to this {@link AssetDispatch} by a {@link User}, {@link Machine}, {@link Asset}, or an assigned {@link DispatchJob}.
47
47
  */
48
48
  lastDispatched: Date;
49
- toJSON(): JsonObject;
49
+ constructor(json?: JsonObject | nothing);
50
+ toJSON(): {
51
+ id: number | null;
52
+ v: number[];
53
+ companyId: number | null;
54
+ jobs: number[];
55
+ directions: {
56
+ distance: number;
57
+ duration: string | null;
58
+ instructions: string;
59
+ path: any[];
60
+ directions: any[];
61
+ job: number | null;
62
+ step: number | null;
63
+ }[];
64
+ lastDispatched: string;
65
+ };
50
66
  fromJSON(json: JsonObject, force?: boolean): boolean;
51
67
  /**
52
68
  * The {@link id} is the key.
@@ -7,7 +7,7 @@ import { ILabelled } from "../API/Interfaces/ILabelled";
7
7
  import { INamed } from "../API/Interfaces/INamed";
8
8
  import { IPictured } from "../API/Interfaces/IPictured";
9
9
  import { ISuspendable } from "../API/Interfaces/ISuspendable";
10
- import { JsonObject, codified, colour, ulong, ushort } from "../API/Types";
10
+ import { JsonObject, codified, colour, nothing, ulong, ushort } from "../API/Types";
11
11
  import { Company } from "../Companies/Company";
12
12
  import { Icon } from "../Images/Icon";
13
13
  import { Picture } from "../Images/Picture";
@@ -110,7 +110,39 @@ export declare class AssetGeneral extends BaseComponent implements IIdUlong, INa
110
110
  * Manufacturer's unique identification number for this trailer.
111
111
  */
112
112
  serial: string;
113
- toJSON(): JsonObject;
113
+ constructor(json?: JsonObject | nothing);
114
+ toJSON(): {
115
+ suspended: boolean;
116
+ since: string | null;
117
+ id: number | null;
118
+ v: number[];
119
+ company: number;
120
+ kind: AssetType;
121
+ name: string;
122
+ notes: string;
123
+ icon: number;
124
+ labels: string[];
125
+ } | {
126
+ references: JsonObject;
127
+ messagingAddress: string;
128
+ pictures: number[];
129
+ contact: number;
130
+ vin: string;
131
+ plate: string;
132
+ make: string;
133
+ model: string;
134
+ year: number | null;
135
+ colour: string;
136
+ serial: string;
137
+ id: number | null;
138
+ v: number[];
139
+ company: number;
140
+ kind: AssetType;
141
+ name: string;
142
+ notes: string;
143
+ icon: number;
144
+ labels: string[];
145
+ };
114
146
  fromJSON(json: JsonObject, force?: boolean): boolean;
115
147
  /**
116
148
  * The {@link id} is the key.
@@ -58,6 +58,7 @@ export declare class Behaviour extends BaseComponent implements IIdUlong, INamed
58
58
  * The list of defined variable name/value pairs for the script requires.
59
59
  */
60
60
  parameters: Map<string, BehaviourParameter>;
61
+ constructor(json?: JsonObject);
61
62
  toJSON(): {
62
63
  id: number | null;
63
64
  v: number[];
@@ -74,6 +74,7 @@ export declare class BehaviourLog extends BaseComponent implements IIdUlong, IBe
74
74
  * The character column where the error was generated.
75
75
  */
76
76
  character: uint;
77
+ constructor(json?: JsonObject);
77
78
  toJSON(): {
78
79
  id: number | null;
79
80
  v: number[];
@@ -61,6 +61,7 @@ export declare class BehaviourScript extends BaseComponent implements IIdUlong,
61
61
  * The codified graphic name given to this script for easy visual identification.
62
62
  */
63
63
  graphic: codified;
64
+ constructor(json?: JsonObject);
64
65
  toJSON(): {
65
66
  id: number | null;
66
67
  v: number[];
@@ -80,6 +80,7 @@ export declare class BillingProfile extends BaseComponent implements IIdUlong, I
80
80
  * Are the Google services available to be proxied by the service?
81
81
  */
82
82
  googleServicesEnabled: boolean;
83
+ constructor(json?: JsonObject);
83
84
  toJSON(): {
84
85
  id: number | null;
85
86
  v: number[];
@@ -9,6 +9,7 @@ export declare class BillableHostingLicense extends BillableHostingBase {
9
9
  * The type of hardware license
10
10
  */
11
11
  kind: BillableHostingLicenseType;
12
+ constructor(json?: JsonObject);
12
13
  toJSON(): {
13
14
  kind: BillableHostingLicenseType;
14
15
  limit: number | null;
@@ -9,6 +9,7 @@ export declare class BillableHostingRule extends BillableHostingBase {
9
9
  * The type of service being billed.
10
10
  */
11
11
  service: BillableHostingType;
12
+ constructor(json?: JsonObject);
12
13
  toJSON(): {
13
14
  service: BillableHostingType;
14
15
  limit: number | null;
@@ -87,6 +87,7 @@ export declare class BillingReport extends BaseComponent implements IIdUlong, IN
87
87
  * Individual amounts per company, used to calculate the results of the report.
88
88
  */
89
89
  breakdown: BillingReportBreakdown[];
90
+ constructor(json?: JsonObject);
90
91
  toJSON(): {
91
92
  id: number | null;
92
93
  v: number[];
@@ -5,7 +5,7 @@ import { IAmCompany } from '../API/Interfaces/IAmCompany';
5
5
  import { IBelongCompany } from '../API/Interfaces/IBelongCompany';
6
6
  import { IIdUlong } from '../API/Interfaces/IIdUlong';
7
7
  import { INamed } from '../API/Interfaces/INamed';
8
- import { JsonObject, codified, ulong } from '../API/Types';
8
+ import { JsonObject, codified, nothing, ulong } from '../API/Types';
9
9
  import { Picture } from '../Images/Picture';
10
10
  import { CompanyDirectory } from './CompanyDirectory';
11
11
  import { CompanyGeneral } from './CompanyGeneral';
@@ -98,9 +98,7 @@ export declare class Company extends BaseCompound implements IIdUlong, INamed, I
98
98
  * If this company is a reseller, then they have their own theme, support and billing information.
99
99
  */
100
100
  reseller: CompanyReseller | null;
101
- /**
102
- *
103
- */
101
+ constructor(json?: JsonObject | nothing);
104
102
  toJSON(): {
105
103
  v: number[];
106
104
  id: number | null;
@@ -2,7 +2,7 @@ import { BaseComponent } from "../API/BaseComponent";
2
2
  import { IAmCompany } from "../API/Interfaces/IAmCompany";
3
3
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
4
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
- import { JsonObject, codified, ulong } from "../API/Types";
5
+ import { JsonObject, codified, nothing, ulong } from "../API/Types";
6
6
  import { Company } from "./Company";
7
7
  /**
8
8
  * The list of Contacts from this and other companies broken down by contact role.
@@ -26,20 +26,13 @@ export declare class CompanyDirectory extends BaseComponent implements IIdUlong,
26
26
  * The list of {@link Contact}s from this and other companies broken down by contact role.
27
27
  */
28
28
  employees: Map<codified, ulong[]>;
29
- /**
30
- *
31
- * @returns
32
- */
29
+ constructor(json?: JsonObject | nothing);
33
30
  toJSON(): {
34
31
  id: number | null;
35
32
  v: number[];
36
33
  parent: number;
37
34
  directory: JsonObject;
38
35
  };
39
- /**
40
- *
41
- * @param json
42
- */
43
36
  fromJSON(json: JsonObject, force?: boolean): boolean;
44
37
  /**
45
38
  * The {@link id} is the key.
@@ -3,7 +3,7 @@ import { IAmCompany } from "../API/Interfaces/IAmCompany";
3
3
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
4
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
5
  import { INamed } from "../API/Interfaces/INamed";
6
- import { JsonObject, ulong } from "../API/Types";
6
+ import { JsonObject, nothing, ulong } from "../API/Types";
7
7
  import { Company } from "./Company";
8
8
  /**
9
9
  * General details about a company.
@@ -35,6 +35,7 @@ export declare class CompanyGeneral extends BaseComponent implements IIdUlong, I
35
35
  * Name/value collections of custom fields used to refer to external systems.
36
36
  */
37
37
  references: Map<string, string>;
38
+ constructor(json?: JsonObject | nothing);
38
39
  toJSON(): {
39
40
  id: number | null;
40
41
  v: number[];
@@ -2,7 +2,7 @@ import { BaseComponent } from "../API/BaseComponent";
2
2
  import { IAmCompany } from "../API/Interfaces/IAmCompany";
3
3
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
4
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
- import { JsonObject, ulong } from "../API/Types";
5
+ import { JsonObject, nothing, ulong } from "../API/Types";
6
6
  import { Company } from "./Company";
7
7
  import { PasswordPolicy } from "./PasswordPolicy";
8
8
  import { SessionPolicy } from "./SessionPolicy";
@@ -32,6 +32,7 @@ export declare class CompanyPolicy extends BaseComponent implements IIdUlong, IA
32
32
  * The password complexity and expiry policy.
33
33
  */
34
34
  passwordPolicy: PasswordPolicy;
35
+ constructor(json?: JsonObject | nothing);
35
36
  toJSON(): {
36
37
  id: number | null;
37
38
  v: number[];
@@ -2,7 +2,7 @@ import { BaseComponent } from "../API/BaseComponent";
2
2
  import { IAmCompany } from "../API/Interfaces/IAmCompany";
3
3
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
4
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
- import { JsonObject, codified, colour, ulong } from "../API/Types";
5
+ import { JsonObject, codified, colour, nothing, ulong } from "../API/Types";
6
6
  import { ColourStyle } from "./ColourStyle";
7
7
  import { Company } from "./Company";
8
8
  import { NotificationServerEmail } from "./NotificationServerEmail";
@@ -116,6 +116,7 @@ export declare class CompanyReseller extends BaseComponent implements IIdUlong,
116
116
  * - &amp; with "&"
117
117
  */
118
118
  recoverIsHtml: boolean;
119
+ constructor(json?: JsonObject | nothing);
119
120
  toJSON(): {
120
121
  id: number | null;
121
122
  v: number[];
@@ -2,7 +2,7 @@ import { BaseComponent } from "../API/BaseComponent";
2
2
  import { IAmCompany } from "../API/Interfaces/IAmCompany";
3
3
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
4
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
- import { JsonObject, codified, ulong } from "../API/Types";
5
+ import { JsonObject, codified, nothing, ulong } from "../API/Types";
6
6
  import { Company } from "./Company";
7
7
  import { LabelStyle } from "./LabelStyle";
8
8
  /**
@@ -31,6 +31,7 @@ export declare class CompanyStyle extends BaseComponent implements IIdUlong, IAm
31
31
  * The styles for status tags added to Assets.
32
32
  */
33
33
  tags: Map<codified, LabelStyle>;
34
+ constructor(json?: JsonObject | nothing);
34
35
  toJSON(): {
35
36
  id: number | null;
36
37
  v: number[];
@@ -3,7 +3,7 @@ import { IBelongAsset } from "../API/Interfaces/IBelongAsset";
3
3
  import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
4
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
5
  import { ILabelled } from "../API/Interfaces/ILabelled";
6
- import { codified, JsonObject, ulong } from "../API/Types";
6
+ import { codified, JsonObject, nothing, ulong } from "../API/Types";
7
7
  import { Asset } from "../Assets/Asset";
8
8
  import { Company } from "../Companies/Company";
9
9
  import { FormResult } from "../Hosting/FormResult";
@@ -84,6 +84,7 @@ export declare class DispatchJob extends BaseComponent implements IIdUlong, ILab
84
84
  * Null if not clocked-in, or no changes have been made.
85
85
  */
86
86
  driver: string;
87
+ constructor(json?: JsonObject | nothing);
87
88
  toJSON(): {
88
89
  id: number | null;
89
90
  company: number | null;
@@ -122,6 +122,7 @@ export declare class DispatchTask extends BaseComponent implements IIdUlong, IBe
122
122
  * Timestamp from the last change made to this task
123
123
  */
124
124
  updatedUtc: Date;
125
+ constructor(json?: JsonObject);
125
126
  toJSON(): {
126
127
  id: number | null;
127
128
  company: number | null;
@@ -3,7 +3,7 @@ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
3
  import { IFileSize } from "../API/Interfaces/IFileSize";
4
4
  import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
5
  import { INamed } from "../API/Interfaces/INamed";
6
- import { ulong, JsonObject } from "../API/Types";
6
+ import { ulong, JsonObject, nothing } from "../API/Types";
7
7
  import { Company } from "../Companies/Company";
8
8
  /**
9
9
  * A file stored temporarily by the system.
@@ -50,6 +50,7 @@ export declare class Document extends BaseComponent implements IIdUlong, INamed,
50
50
  * Name/value collections of custom fields used to refer to external systems.
51
51
  */
52
52
  references: Map<string, string>;
53
+ constructor(json?: JsonObject | nothing);
53
54
  toJSON(): {
54
55
  id: number | null;
55
56
  v: number[];
@@ -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, JsonObject } from "../API/Types";
8
+ import { codified, ulong, JsonObject, nothing } from "../API/Types";
9
9
  import { Asset } from "../Assets/Asset";
10
10
  import { Company } from "../Companies/Company";
11
11
  import { FormTemplate } from "./FormTemplate";
@@ -77,6 +77,7 @@ export declare class FormResult extends BaseComponent implements IIdUlong, IName
77
77
  * The {@link id} is the key.
78
78
  */
79
79
  getKey(): number;
80
+ constructor(json?: JsonObject | nothing);
80
81
  toJSON(): {
81
82
  id: number;
82
83
  company: number;
@@ -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, JsonObject } from "../API/Types";
7
+ import { codified, colour, ulong, JsonObject, nothing } 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,6 +64,7 @@ export declare class FormTemplate extends BaseComponent implements IIdUlong, INa
64
64
  * The {@link id} is the key.
65
65
  */
66
66
  getKey(): number;
67
+ constructor(json?: JsonObject | nothing);
67
68
  toJSON(): {
68
69
  id: number | null;
69
70
  company: number | null;
@@ -1,5 +1,5 @@
1
1
  import { TimeSpan } from "../API/TimeSpan";
2
- import { guid, JsonObject, single } from "../API/Types";
2
+ import { guid, JsonObject, nothing, single } from "../API/Types";
3
3
  import { DashcamBase } from "./DashcamBase";
4
4
  import { DashcamMediaType } from "./DashcamMediaType";
5
5
  /**
@@ -36,7 +36,7 @@ export declare class Dashcam extends DashcamBase {
36
36
  * The reason why we're saving this image/video. Or the event name that triggered it.
37
37
  */
38
38
  eventName: string;
39
- fromJSON(json: JsonObject, force?: boolean): boolean;
39
+ constructor(json?: JsonObject | nothing);
40
40
  toJSON(): {
41
41
  guid: string;
42
42
  kind: DashcamMediaType;
@@ -56,6 +56,7 @@ export declare class Dashcam extends DashcamBase {
56
56
  heading: number | null;
57
57
  altitude: number | null;
58
58
  };
59
+ fromJSON(json: JsonObject, force?: boolean): boolean;
59
60
  /**
60
61
  * The {@link guid} is the key.
61
62
  */
@@ -1,4 +1,4 @@
1
- import { JsonObject } from "../API/Types";
1
+ import { JsonObject, nothing } from "../API/Types";
2
2
  import { DashcamBase } from "./DashcamBase";
3
3
  import { DashcamMediaType } from "./DashcamMediaType";
4
4
  /**
@@ -13,7 +13,7 @@ export declare class DashcamLive extends DashcamBase {
13
13
  * Timestamp of this live camera image.
14
14
  */
15
15
  dts: Date;
16
- fromJSON(json: JsonObject, force?: boolean): boolean;
16
+ constructor(json?: JsonObject | nothing);
17
17
  toJSON(): {
18
18
  kind: DashcamMediaType;
19
19
  dts: string | null;
@@ -29,6 +29,7 @@ export declare class DashcamLive extends DashcamBase {
29
29
  heading: number | null;
30
30
  altitude: number | null;
31
31
  };
32
+ fromJSON(json: JsonObject, force?: boolean): boolean;
32
33
  /**
33
34
  * A combination of the asset, provider, and camera number.
34
35
  */