@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.
- package/API/Base.d.ts +3 -2
- package/API/BaseComponent.d.ts +9 -6
- package/API/Codifier.d.ts +11 -1
- package/API/Encoding.d.ts +9 -0
- package/API/Files.d.ts +4 -4
- package/API/Functions.d.ts +26 -21
- package/API/Geography/Functions.d.ts +4 -0
- package/API/Geography/Interfaces.d.ts +19 -14
- package/API/Geography/LatLng.d.ts +9 -1
- package/API/Geography/LatLngBounds.d.ts +2 -1
- package/API/Geography/Position.d.ts +23 -11
- package/API/Geography/StreetAddress.d.ts +3 -2
- package/API/Geometry/Functions.d.ts +1 -1
- package/API/Geometry/Point.d.ts +4 -3
- package/API/Geometry/Radial.d.ts +5 -4
- package/API/Geometry/Rectangle.d.ts +3 -7
- package/API/Geometry/Size.d.ts +8 -2
- package/API/Interfaces/IAuditable.d.ts +31 -0
- package/API/Interfaces/IDeserializable.d.ts +2 -1
- package/API/Interfaces/ILabelled.d.ts +2 -1
- package/API/Interfaces/IRequestable.d.ts +5 -1
- package/API/Objects.d.ts +0 -28
- package/API/SearchPattern.d.ts +3 -2
- package/API/TimeSpan.d.ts +7 -38
- package/API/Timezone.d.ts +3 -3
- package/API/Types.d.ts +18 -0
- package/Accounts/Contact.d.ts +10 -10
- package/Accounts/Machine.d.ts +14 -6
- package/Accounts/Permissions/Permission.d.ts +3 -3
- package/Accounts/Permissions/PermissionEscalation.d.ts +11 -3
- package/Accounts/Permissions/PermissionEscalationState.d.ts +5 -3
- package/Accounts/Session.d.ts +2 -2
- package/Accounts/User.d.ts +10 -10
- package/Accounts/UserAdvanced.d.ts +2 -2
- package/Accounts/UserGeneral.d.ts +5 -5
- package/Accounts/UserGroup.d.ts +3 -3
- package/Accounts/UserNotifications.d.ts +2 -2
- package/Assets/Asset.d.ts +56 -24
- package/Assets/AssetAdvanced.d.ts +8 -20
- package/Assets/AssetAttribute.d.ts +2 -2
- package/Assets/AssetDispatch.d.ts +5 -12
- package/Assets/AssetGeneral.d.ts +44 -24
- package/Assets/AssetPlaceStatus.d.ts +2 -2
- package/Behaviours/Behaviour.d.ts +4 -4
- package/Behaviours/BehaviourLog.d.ts +3 -3
- package/Behaviours/BehaviourParameter.d.ts +2 -1
- package/Behaviours/BehaviourScript.d.ts +4 -4
- package/Billing/BillableBase.d.ts +3 -3
- package/Billing/BillableSmsProfile.d.ts +2 -2
- package/Billing/BillingProfile.d.ts +3 -3
- package/Billing/Hosting/BillableHostingBase.d.ts +2 -2
- package/Billing/Hosting/BillableHostingDiscount.d.ts +2 -1
- package/Billing/Hosting/BillableHostingLicense.d.ts +2 -1
- package/Billing/Hosting/BillableHostingRule.d.ts +2 -1
- package/Billing/Report/BillingReport.d.ts +3 -3
- package/Billing/Report/BillingReportBreakdown.d.ts +2 -2
- package/Billing/Report/BillingReportHostingSummary.d.ts +2 -2
- package/Billing/Report/BillingReportLicenseBreakdown.d.ts +2 -2
- package/Billing/Report/BillingReportServiceBreakdown.d.ts +2 -2
- package/Billing/Report/BillingReportSummary.d.ts +2 -2
- package/Companies/ColourStyle.d.ts +2 -2
- package/Companies/Company.d.ts +48 -33
- package/Companies/CompanyDirectory.d.ts +10 -5
- package/Companies/CompanyGeneral.d.ts +10 -5
- package/Companies/{CompanyPolicies.d.ts → CompanyPolicy.d.ts} +9 -4
- package/Companies/CompanyReseller.d.ts +14 -9
- package/Companies/{CompanyStyles.d.ts → CompanyStyle.d.ts} +11 -6
- package/Companies/LabelStyle.d.ts +2 -2
- package/Companies/NotificationServerEmail.d.ts +2 -2
- package/Companies/NotificationServerSms.d.ts +3 -3
- package/Companies/PasswordPolicy.d.ts +2 -2
- package/Companies/SessionPolicy.d.ts +2 -2
- package/Dispatch/DispatchDirection.d.ts +3 -3
- package/Dispatch/DispatchJob.d.ts +4 -4
- package/Dispatch/DispatchStep.d.ts +4 -4
- package/Dispatch/DispatchStepState.d.ts +3 -3
- package/Dispatch/DispatchTask.d.ts +5 -5
- package/Hosting/Document.d.ts +3 -3
- package/Hosting/Fields/FormFieldAttachments.d.ts +4 -11
- package/Hosting/Fields/FormFieldBase.d.ts +8 -23
- package/Hosting/Fields/FormFieldBase_fromJSON.d.ts +1 -0
- package/Hosting/Fields/FormFieldBoolean.d.ts +4 -12
- package/Hosting/Fields/FormFieldChoice.d.ts +10 -12
- package/Hosting/Fields/FormFieldDate.d.ts +2 -9
- package/Hosting/Fields/FormFieldNumeric.d.ts +2 -9
- package/Hosting/Fields/FormFieldSignature.d.ts +2 -2
- package/Hosting/Fields/FormFieldText.d.ts +2 -9
- package/Hosting/Fields/FormFieldTime.d.ts +12 -9
- package/Hosting/Fields/FormFieldTimezone.d.ts +2 -2
- package/Hosting/FormResult.d.ts +4 -4
- package/Hosting/FormTemplate.d.ts +3 -3
- package/Images/Dashcam.d.ts +3 -3
- package/Images/DashcamBase.d.ts +2 -2
- package/Images/DashcamLive.d.ts +3 -3
- package/Images/Icon.d.ts +7 -27
- package/Images/IconGlyph.d.ts +5 -12
- package/Images/IconLabel.d.ts +5 -8
- package/Images/Picture.d.ts +3 -3
- package/Maintenance/MaintenanceInterval.d.ts +2 -2
- package/Maintenance/MaintenanceJob.d.ts +3 -3
- package/Maintenance/MaintenanceSchedule.d.ts +4 -4
- package/Messaging/AssetAlert.d.ts +2 -1
- package/Messaging/AssetMessage.d.ts +2 -2
- package/Messaging/MessageBase.d.ts +3 -3
- package/Places/Place.d.ts +4 -4
- package/Providers/Config/ProviderConfig.d.ts +4 -4
- package/Providers/Config/ProviderRegistration.d.ts +2 -2
- package/Providers/Config/ProviderScript.d.ts +4 -4
- package/Providers/Config/ProviderScriptBlock.d.ts +2 -1
- package/Providers/Config/ProviderScriptParameter.d.ts +2 -2
- package/Providers/Configuration/ProviderConfiguration.d.ts +4 -4
- package/Providers/Configuration/ProviderConfigurationNode.d.ts +4 -3
- package/Providers/Configuration/ProviderConfigurationType.d.ts +4 -4
- package/Providers/Configuration/ProviderGeofenceBase.d.ts +6 -8
- package/Providers/Configuration/ProviderGeofenceBase_fromJSON.d.ts +1 -0
- package/Providers/Provider.d.ts +80 -14
- package/Providers/ProviderAdvanced.d.ts +4 -4
- package/Providers/ProviderCommand.d.ts +2 -2
- package/Providers/ProviderControl.d.ts +3 -3
- package/Providers/ProviderData.d.ts +2 -2
- package/Providers/ProviderGeneral.d.ts +18 -10
- package/Reports/ReportBreakdown.d.ts +9 -32
- package/Reports/ReportBreakdownJob.d.ts +6 -31
- package/Reports/ReportBreakdownMessage.d.ts +7 -32
- package/Reports/ReportBreakdownTask.d.ts +6 -31
- package/Reports/ReportBreakdown_fromJSON.d.ts +1 -0
- package/Reports/ReportNotifications.d.ts +3 -3
- package/Reports/ReportOptions.d.ts +3 -2
- package/Reports/ReportParameter.d.ts +2 -1
- package/Reports/ReportRecurrence.d.ts +2 -2
- package/Reports/ReportResult.d.ts +9 -9
- package/Reports/ReportSchedule.d.ts +3 -3
- package/Reports/ReportScorecard.d.ts +3 -3
- package/Reports/ReportScorecardParameter.d.ts +2 -2
- package/Reports/ReportScorecardRules.d.ts +2 -2
- package/Reports/ReportSummary.d.ts +5 -33
- package/Reports/ReportTemplate.d.ts +3 -3
- package/Reports/ReportTotal.d.ts +2 -2
- package/index.d.ts +406 -0
- package/package.json +31 -22
- package/{Storage.d.ts → storage.d.ts} +11 -1
- package/trakit-objects.min.js +8 -0
- package/API/Component.d.ts +0 -42
- package/API/Compound.d.ts +0 -19
- package/Assets/Person.d.ts +0 -25
- package/Assets/PersonGeneral.d.ts +0 -35
- package/Assets/Trailer.d.ts +0 -42
- package/Assets/TrailerGeneral.d.ts +0 -47
- package/Assets/Vehicle.d.ts +0 -73
- package/Assets/VehicleAdvanced.d.ts +0 -25
- package/Assets/VehicleGeneral.d.ts +0 -33
- package/README.md +0 -13
- package/Reports/ReportDataTotal.d.ts +0 -50
- package/objects.d.ts +0 -534
- package/objects.min.js +0 -7
package/API/SearchPattern.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { nothing } from './Types';
|
|
1
2
|
/**
|
|
2
3
|
* A common structure used to implement searching throughout the system.
|
|
3
4
|
* The input format is described in the {@link /wss/#format-expression|WebSocket reference}.
|
|
@@ -7,12 +8,12 @@ export declare class SearchPattern {
|
|
|
7
8
|
* Creates an array of {@link SearchPattern}s for easier matching. Used for doing OR matching.
|
|
8
9
|
* @param expression
|
|
9
10
|
*/
|
|
10
|
-
static parse(expression?: string |
|
|
11
|
+
static parse(expression?: string | nothing): SearchPattern[];
|
|
11
12
|
/**
|
|
12
13
|
* Creates a single string from the given array of {@link SearchPattern}s for easier serialization.
|
|
13
14
|
* @param patterns
|
|
14
15
|
*/
|
|
15
|
-
static stringify(patterns?: SearchPattern[] |
|
|
16
|
+
static stringify(patterns?: SearchPattern[] | nothing): string | null;
|
|
16
17
|
/**
|
|
17
18
|
* To help qualify matches, all operators must match for the search to be
|
|
18
19
|
* considered matched.
|
package/API/TimeSpan.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { timespan } from "./Types";
|
|
1
|
+
import { nothing, timespan } from "./Types";
|
|
2
2
|
/**
|
|
3
3
|
* An object which represents an interval of time.
|
|
4
4
|
*/
|
|
5
5
|
export declare class TimeSpan {
|
|
6
|
+
#private;
|
|
6
7
|
/**
|
|
7
8
|
* Constructs a new TimeSpan with the value specified in days.
|
|
8
9
|
*/
|
|
@@ -23,34 +24,10 @@ export declare class TimeSpan {
|
|
|
23
24
|
* Constructs a new TimeSpan with the value specified in milliseconds.
|
|
24
25
|
*/
|
|
25
26
|
static fromMilliseconds(value: number): TimeSpan;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
private __total;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
private __days;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
private __hours;
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
private __minutes;
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
*/
|
|
45
|
-
private __seconds;
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
*/
|
|
49
|
-
private __milli;
|
|
50
27
|
/**
|
|
51
28
|
* @param duration A time-span formatted string, or a number representing milliseconds
|
|
52
29
|
*/
|
|
53
|
-
constructor(duration?: TimeSpan | timespan | number |
|
|
30
|
+
constructor(duration?: TimeSpan | timespan | number | nothing);
|
|
54
31
|
/**
|
|
55
32
|
* Days component of the time-span.
|
|
56
33
|
*/
|
|
@@ -99,30 +76,22 @@ export declare class TimeSpan {
|
|
|
99
76
|
toString(format?: timespan): timespan;
|
|
100
77
|
/**
|
|
101
78
|
* Same as {@link TimeSpan#toString}.
|
|
102
|
-
* @expose
|
|
103
|
-
* @this {TimeSpan}
|
|
104
79
|
*/
|
|
105
80
|
toJSON: (format?: timespan) => timespan;
|
|
106
81
|
/**
|
|
107
82
|
* Gets the comparable value of this time-span as total milliseconds.
|
|
108
|
-
* @override
|
|
109
|
-
* @this {TimeSpan}
|
|
110
83
|
*/
|
|
111
84
|
valueOf(): number;
|
|
112
85
|
/**
|
|
113
86
|
* Adds the given value to the current time-span.
|
|
114
|
-
* @expose
|
|
115
|
-
* @this {TimeSpan}
|
|
116
87
|
* @param duration A time-span formatted string, or a number representing milliseconds
|
|
117
|
-
* @param subtract
|
|
88
|
+
* @param subtract When true, the value is subtracted from the time-span instead of added.
|
|
118
89
|
*/
|
|
119
90
|
add(duration: TimeSpan | timespan | number, subtract?: boolean): number;
|
|
120
91
|
/**
|
|
121
92
|
* Subtracts the given value from the time-span.
|
|
122
|
-
* @expose
|
|
123
|
-
* @this {TimeSpan}
|
|
124
93
|
* @param duration A time-span formatted string, or a number representing milliseconds
|
|
125
|
-
* @param add
|
|
94
|
+
* @param add When true, the value is added from the time-span instead of subtracted.
|
|
126
95
|
*/
|
|
127
96
|
subtract(duration: TimeSpan | timespan | number, add?: boolean): number;
|
|
128
97
|
}
|
|
@@ -131,10 +100,10 @@ export declare class TimeSpan {
|
|
|
131
100
|
* For example the string "1.07:42:03.467" equals 114123.467, which is 1 day, 7 hours, 42 minutes, 3 seconds, and 467 milliseconds.
|
|
132
101
|
* @param duration A valid timespan string. The format is [-]( d | [d.]hh:mm[:ss[.fff]] )
|
|
133
102
|
*/
|
|
134
|
-
export declare function
|
|
103
|
+
export declare function TIMESPAN_PARSE(duration: TimeSpan | timespan | number): number;
|
|
135
104
|
/**
|
|
136
105
|
* Parses a number representing the total seconds into a serialized TimeSpan string.
|
|
137
106
|
* For example the number 114123.467 would be serialized as "1.07:42:03.467".
|
|
138
107
|
* @param value Use a decimal to show milliseconds.
|
|
139
108
|
*/
|
|
140
|
-
export declare function
|
|
109
|
+
export declare function TIMESPAN_STRINGIFY(value: number): timespan;
|
package/API/Timezone.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRequestable } from "./Interfaces/IRequestable";
|
|
2
2
|
import { ISerializable } from "./Interfaces/ISerializable";
|
|
3
|
-
import { short } from "./Types";
|
|
3
|
+
import { short, JsonObject } from "./Types";
|
|
4
4
|
/**
|
|
5
5
|
* Timezone definition
|
|
6
6
|
*/
|
|
@@ -9,7 +9,7 @@ export declare class Timezone implements IRequestable, ISerializable {
|
|
|
9
9
|
*
|
|
10
10
|
* @param json
|
|
11
11
|
*/
|
|
12
|
-
static fromJSON(json:
|
|
12
|
+
static fromJSON(json: JsonObject): Timezone;
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
@@ -30,7 +30,7 @@ export declare class Timezone implements IRequestable, ISerializable {
|
|
|
30
30
|
* Indicates whether this timezone abides by daylight savings
|
|
31
31
|
*/
|
|
32
32
|
dst: boolean;
|
|
33
|
-
constructor(code: string, name
|
|
33
|
+
constructor(code: string, name?: string, offset?: short, dst?: boolean);
|
|
34
34
|
toJSON(): {
|
|
35
35
|
code: string;
|
|
36
36
|
name: string;
|
package/API/Types.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the absence of a value.
|
|
3
|
+
**/
|
|
4
|
+
export type nothing = undefined | null;
|
|
1
5
|
/**
|
|
2
6
|
* 8bit integer
|
|
3
7
|
* @example minimum value (-128) to maximum value (127)
|
|
@@ -112,3 +116,17 @@ export type timespan = string;
|
|
|
112
116
|
* @example "protocol:path?query"
|
|
113
117
|
**/
|
|
114
118
|
export type url = string;
|
|
119
|
+
/**
|
|
120
|
+
* A JSON object is an unordered collection of key/value pairs.
|
|
121
|
+
*/
|
|
122
|
+
export type JsonObject = {
|
|
123
|
+
[key: string]: JsonValue;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* An array of any valid JSON value.
|
|
127
|
+
*/
|
|
128
|
+
export type JsonArray = JsonValue[];
|
|
129
|
+
/**
|
|
130
|
+
* Any valid JSON value.
|
|
131
|
+
*/
|
|
132
|
+
export type JsonValue = null | boolean | number | string | JsonArray | JsonObject;
|
package/Accounts/Contact.d.ts
CHANGED
|
@@ -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, phone, ulong, url } from "../API/Types";
|
|
6
|
+
import { codified, email, JsonObject, phone, ulong, url } from "../API/Types";
|
|
7
7
|
import { Company } from "../Companies/Company";
|
|
8
8
|
import { Picture } from "../Images/Picture";
|
|
9
9
|
/**
|
|
@@ -122,19 +122,19 @@ export declare class Contact extends BaseComponent implements IIdUlong, INamed,
|
|
|
122
122
|
company: number;
|
|
123
123
|
name: string;
|
|
124
124
|
notes: string;
|
|
125
|
-
otherNames:
|
|
126
|
-
emails:
|
|
127
|
-
phones:
|
|
128
|
-
addresses:
|
|
129
|
-
urls:
|
|
130
|
-
dates:
|
|
131
|
-
options:
|
|
125
|
+
otherNames: JsonObject;
|
|
126
|
+
emails: JsonObject;
|
|
127
|
+
phones: JsonObject;
|
|
128
|
+
addresses: JsonObject;
|
|
129
|
+
urls: JsonObject;
|
|
130
|
+
dates: JsonObject;
|
|
131
|
+
options: JsonObject;
|
|
132
132
|
roles: string[];
|
|
133
133
|
pictures: number[];
|
|
134
134
|
};
|
|
135
|
-
fromJSON(json:
|
|
135
|
+
fromJSON(json: JsonObject, force?: boolean): boolean;
|
|
136
136
|
/**
|
|
137
137
|
* The {@link id} is the key.
|
|
138
138
|
*/
|
|
139
|
-
getKey():
|
|
139
|
+
getKey(): number;
|
|
140
140
|
}
|
package/Accounts/Machine.d.ts
CHANGED
|
@@ -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, ulong, url } from '../API/Types';
|
|
7
|
+
import { codified, ipv4, JsonObject, 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';
|
|
@@ -32,7 +32,7 @@ export declare class Machine extends BaseComponent implements IEnabled, IBelongC
|
|
|
32
32
|
/**
|
|
33
33
|
* A token used to encode or validate requests.
|
|
34
34
|
*/
|
|
35
|
-
secret: string
|
|
35
|
+
secret: string;
|
|
36
36
|
/**
|
|
37
37
|
* Human friendly name for these credentials
|
|
38
38
|
*/
|
|
@@ -113,9 +113,9 @@ export declare class Machine extends BaseComponent implements IEnabled, IBelongC
|
|
|
113
113
|
notAfter: string | null;
|
|
114
114
|
timezone: string;
|
|
115
115
|
language: string;
|
|
116
|
-
formats:
|
|
117
|
-
measurements:
|
|
118
|
-
options:
|
|
116
|
+
formats: JsonObject;
|
|
117
|
+
measurements: JsonObject;
|
|
118
|
+
options: JsonObject;
|
|
119
119
|
groups: number[];
|
|
120
120
|
permissions: any[];
|
|
121
121
|
services: string[];
|
|
@@ -123,9 +123,17 @@ export declare class Machine extends BaseComponent implements IEnabled, IBelongC
|
|
|
123
123
|
ipRanges: string[];
|
|
124
124
|
insecure: boolean;
|
|
125
125
|
};
|
|
126
|
-
fromJSON(json:
|
|
126
|
+
fromJSON(json: JsonObject, force?: boolean): boolean;
|
|
127
127
|
/**
|
|
128
128
|
* The {@link key} is the key (how about that).
|
|
129
129
|
*/
|
|
130
130
|
getKey(): string;
|
|
131
|
+
/**
|
|
132
|
+
* Creates an HMAC256 signed input for use in requests.
|
|
133
|
+
* @param absoluteUri URL of the request.
|
|
134
|
+
* @param method HTTP verb of the request.
|
|
135
|
+
* @param contentLength Content length of the request.
|
|
136
|
+
* @param date Timestamp for when the request is created.
|
|
137
|
+
*/
|
|
138
|
+
createHmacSignature(absoluteUri: URL | string, method?: string, contentLength?: number, date?: Date): Promise<string>;
|
|
131
139
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { codified, ulong } from '../../API/Types';
|
|
1
|
+
import { codified, JsonObject, nothing, ulong } from '../../API/Types';
|
|
2
2
|
import { PermissionType } from './PermissionType';
|
|
3
3
|
import { PermissionLevel } from './PermissionLevel';
|
|
4
4
|
import { PermissionMethod } from './PermissionMethod';
|
|
@@ -14,7 +14,7 @@ export declare class Permission implements IBelongCompany, ISerializable {
|
|
|
14
14
|
* @param json
|
|
15
15
|
* @returns
|
|
16
16
|
*/
|
|
17
|
-
static fromJSON(json:
|
|
17
|
+
static fromJSON(json: JsonObject): Permission;
|
|
18
18
|
/**
|
|
19
19
|
* The {@link Company} that this permission targets.
|
|
20
20
|
* {@link Company.id}
|
|
@@ -46,7 +46,7 @@ export declare class Permission implements IBelongCompany, ISerializable {
|
|
|
46
46
|
* Codified names of {@link LabelStyle}s. If list is empty, this permission applies for all labels.
|
|
47
47
|
*/
|
|
48
48
|
labels: codified[];
|
|
49
|
-
constructor(company?: ulong, kind?: PermissionType, level?: PermissionLevel, method?: PermissionMethod, labels?: codified[] |
|
|
49
|
+
constructor(company?: ulong | nothing, kind?: PermissionType | nothing, level?: PermissionLevel | nothing, method?: PermissionMethod | nothing, labels?: codified[] | nothing);
|
|
50
50
|
toJSON(): {
|
|
51
51
|
company: number | null;
|
|
52
52
|
kind: PermissionType;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ISerializable } from "../../API/Interfaces/ISerializable";
|
|
2
|
+
import { codified, JsonObject, nothing, ulong } from "../../API/Types";
|
|
2
3
|
import { PermissionEscalationState } from "./PermissionEscalationState";
|
|
3
4
|
import { PermissionEscalationType } from "./PermissionEscalationType";
|
|
4
5
|
import { PermissionLevel } from "./PermissionLevel";
|
|
@@ -7,7 +8,13 @@ import { PermissionType } from "./PermissionType";
|
|
|
7
8
|
* Used to throw permission escalation exceptions, this is similar to a {@link Permission},
|
|
8
9
|
* but defines a {@link before} and {@link after} for a proposed change.
|
|
9
10
|
*/
|
|
10
|
-
export declare class PermissionEscalation {
|
|
11
|
+
export declare class PermissionEscalation implements ISerializable {
|
|
12
|
+
/**
|
|
13
|
+
* Parses a JSON object into a PermissionEscalation instance.
|
|
14
|
+
* @param json The JSON to parse.
|
|
15
|
+
* @returns A PermissionEscalation instance.
|
|
16
|
+
*/
|
|
17
|
+
static fromJSON(json: JsonObject): PermissionEscalation;
|
|
11
18
|
/**
|
|
12
19
|
* Gets the direction of the escalation.
|
|
13
20
|
*/
|
|
@@ -29,5 +36,6 @@ export declare class PermissionEscalation {
|
|
|
29
36
|
* Effective permission before the proposed change.
|
|
30
37
|
*/
|
|
31
38
|
before: PermissionEscalationState;
|
|
32
|
-
constructor(direction: PermissionEscalationType, company: ulong, kind: PermissionType, levelAfter: PermissionLevel, labelsAfter
|
|
39
|
+
constructor(direction: PermissionEscalationType, company: ulong, kind: PermissionType, levelAfter: PermissionLevel, labelsAfter?: codified[] | nothing, levelBefore?: PermissionLevel | nothing, labelsBefore?: codified[] | nothing);
|
|
40
|
+
toJSON(): JsonObject;
|
|
33
41
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ISerializable } from "../../API/Interfaces/ISerializable";
|
|
2
|
+
import { codified, JsonObject, nothing } from "../../API/Types";
|
|
2
3
|
import { PermissionLevel } from "./PermissionLevel";
|
|
3
4
|
/**
|
|
4
5
|
* Describes the changes in state that raised the escalation.
|
|
5
6
|
*/
|
|
6
|
-
export declare class PermissionEscalationState {
|
|
7
|
+
export declare class PermissionEscalationState implements ISerializable {
|
|
7
8
|
/**
|
|
8
9
|
* The level of access defined before the proposed change.
|
|
9
10
|
*/
|
|
@@ -13,5 +14,6 @@ export declare class PermissionEscalationState {
|
|
|
13
14
|
* If list is empty, this permission applies for all labels.
|
|
14
15
|
*/
|
|
15
16
|
labels: codified[] | null;
|
|
16
|
-
constructor(level?: PermissionLevel |
|
|
17
|
+
constructor(level?: PermissionLevel | nothing, labels?: codified[] | nothing);
|
|
18
|
+
toJSON(): JsonObject;
|
|
17
19
|
}
|
package/Accounts/Session.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
|
|
2
2
|
import { IRequestable } from "../API/Interfaces/IRequestable";
|
|
3
3
|
import { ISerializable } from "../API/Interfaces/ISerializable";
|
|
4
|
-
import { datetime, int, ulong } from "../API/Types";
|
|
4
|
+
import { datetime, int, JsonObject, ulong } from "../API/Types";
|
|
5
5
|
import { Company } from "../Companies/Company";
|
|
6
6
|
import { SessionStatus } from "./SessionStatus";
|
|
7
7
|
/**
|
|
@@ -12,7 +12,7 @@ export declare class Session implements IBelongCompany, IRequestable, ISerializa
|
|
|
12
12
|
*
|
|
13
13
|
* @param json
|
|
14
14
|
*/
|
|
15
|
-
static fromJSON(json:
|
|
15
|
+
static fromJSON(json: JsonObject): Session;
|
|
16
16
|
/**
|
|
17
17
|
* A "handle" identifying a resource.
|
|
18
18
|
*/
|
package/Accounts/User.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { IEnabled } from "../API/Interfaces/IEnabled";
|
|
|
5
5
|
import { IHavePermissions } from "../API/Interfaces/IHavePermissions";
|
|
6
6
|
import { IHavePreferences } from "../API/Interfaces/IHavePreferences";
|
|
7
7
|
import { Timezone } from "../API/Timezone";
|
|
8
|
-
import { codified, datetimetemplate, email, ulong } from "../API/Types";
|
|
8
|
+
import { codified, datetimetemplate, email, JsonObject, nothing, ulong } from "../API/Types";
|
|
9
9
|
import { Company } from "../Companies/Company";
|
|
10
10
|
import { Contact } from "./Contact";
|
|
11
11
|
import { Permission } from "./Permissions/Permission";
|
|
@@ -62,13 +62,13 @@ export declare class User extends BaseCompound implements IEnabled, IBelongCompa
|
|
|
62
62
|
* {@link Contact.id}
|
|
63
63
|
*/
|
|
64
64
|
get contactId(): ulong;
|
|
65
|
-
set contactId(value: ulong |
|
|
65
|
+
set contactId(value: ulong | nothing);
|
|
66
66
|
/**
|
|
67
67
|
* Contact information for this user.
|
|
68
68
|
* {@link Contact.id}
|
|
69
69
|
*/
|
|
70
70
|
get contact(): Contact;
|
|
71
|
-
set contact(value: Contact |
|
|
71
|
+
set contact(value: Contact | nothing);
|
|
72
72
|
/**
|
|
73
73
|
* The user's local timezone.
|
|
74
74
|
* {@link Timezone.code}
|
|
@@ -123,6 +123,9 @@ export declare class User extends BaseCompound implements IEnabled, IBelongCompa
|
|
|
123
123
|
get permissions(): Permission[];
|
|
124
124
|
set permissions(value: Permission[]);
|
|
125
125
|
toJSON(): {
|
|
126
|
+
v: number[];
|
|
127
|
+
login: string;
|
|
128
|
+
company: number;
|
|
126
129
|
groups: number[];
|
|
127
130
|
permissions: any[];
|
|
128
131
|
nickname: string;
|
|
@@ -131,15 +134,12 @@ export declare class User extends BaseCompound implements IEnabled, IBelongCompa
|
|
|
131
134
|
passwordExpired: boolean;
|
|
132
135
|
timezone: string;
|
|
133
136
|
language: string;
|
|
134
|
-
formats:
|
|
135
|
-
measurements:
|
|
136
|
-
options:
|
|
137
|
+
formats: JsonObject;
|
|
138
|
+
measurements: JsonObject;
|
|
139
|
+
options: JsonObject;
|
|
137
140
|
notify: any[];
|
|
138
|
-
login: string;
|
|
139
|
-
v: number[];
|
|
140
|
-
company: number;
|
|
141
141
|
};
|
|
142
|
-
fromJSON(json:
|
|
142
|
+
fromJSON(json: JsonObject, force?: boolean): boolean;
|
|
143
143
|
/**
|
|
144
144
|
* The {@link login} is the key.
|
|
145
145
|
*/
|
|
@@ -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, ulong } from "../API/Types";
|
|
4
|
+
import { email, JsonObject, ulong } from "../API/Types";
|
|
5
5
|
import { Company } from "../Companies/Company";
|
|
6
6
|
import { Permission } from "./Permissions/Permission";
|
|
7
7
|
import { UserGroup } from "./UserGroup";
|
|
@@ -46,7 +46,7 @@ export declare class UserAdvanced extends BaseComponent implements IBelongCompan
|
|
|
46
46
|
groups: number[];
|
|
47
47
|
permissions: any[];
|
|
48
48
|
};
|
|
49
|
-
fromJSON(json:
|
|
49
|
+
fromJSON(json: JsonObject, force?: boolean): boolean;
|
|
50
50
|
/**
|
|
51
51
|
* The {@link login} is the key.
|
|
52
52
|
*/
|
|
@@ -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 { codified, datetimetemplate, email, ulong } from "../API/Types";
|
|
6
|
+
import { JsonObject, codified, datetimetemplate, email, ulong } from "../API/Types";
|
|
7
7
|
import { Company } from "../Companies/Company";
|
|
8
8
|
import { Contact } from "./Contact";
|
|
9
9
|
import { SystemsOfUnits } from "./SystemsOfUnits";
|
|
@@ -87,12 +87,12 @@ export declare class UserGeneral extends BaseComponent implements IEnabled, IBel
|
|
|
87
87
|
passwordExpired: boolean;
|
|
88
88
|
timezone: string;
|
|
89
89
|
language: string;
|
|
90
|
-
formats:
|
|
91
|
-
measurements:
|
|
92
|
-
options:
|
|
90
|
+
formats: JsonObject;
|
|
91
|
+
measurements: JsonObject;
|
|
92
|
+
options: JsonObject;
|
|
93
93
|
notify: any[];
|
|
94
94
|
};
|
|
95
|
-
fromJSON(json:
|
|
95
|
+
fromJSON(json: JsonObject, force?: boolean): boolean;
|
|
96
96
|
/**
|
|
97
97
|
* The {@link login} is the key.
|
|
98
98
|
*/
|
package/Accounts/UserGroup.d.ts
CHANGED
|
@@ -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 { Permission } from "./Permissions/Permission";
|
|
8
8
|
/**
|
|
@@ -44,9 +44,9 @@ export declare class UserGroup extends BaseComponent implements IIdUlong, INamed
|
|
|
44
44
|
notes: string;
|
|
45
45
|
permissions: any[];
|
|
46
46
|
};
|
|
47
|
-
fromJSON(json:
|
|
47
|
+
fromJSON(json: JsonObject, force?: boolean): boolean;
|
|
48
48
|
/**
|
|
49
49
|
* The {@link id} is the key.
|
|
50
50
|
*/
|
|
51
|
-
getKey():
|
|
51
|
+
getKey(): number;
|
|
52
52
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IEnabled } from "../API/Interfaces/IEnabled";
|
|
2
2
|
import { ISerializable } from "../API/Interfaces/ISerializable";
|
|
3
3
|
import { TimeSpan } from "../API/TimeSpan";
|
|
4
|
-
import { email, timespan, ulong } from "../API/Types";
|
|
4
|
+
import { email, JsonObject, timespan, ulong } from "../API/Types";
|
|
5
5
|
import { NotificationMethod } from "./NotificationMethod";
|
|
6
6
|
/**
|
|
7
7
|
* Definition of how and when to send alerts to the user.
|
|
@@ -11,7 +11,7 @@ export declare class UserNotifications implements IEnabled, ISerializable {
|
|
|
11
11
|
*
|
|
12
12
|
* @param json
|
|
13
13
|
*/
|
|
14
|
-
static fromJSON(json:
|
|
14
|
+
static fromJSON(json: JsonObject): UserNotifications;
|
|
15
15
|
/**
|
|
16
16
|
* A common name like "Weekdays" or "Off Hours".
|
|
17
17
|
*/
|
package/Assets/Asset.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Contact } from "../Accounts/Contact";
|
|
1
2
|
import { BaseComponent } from "../API/BaseComponent";
|
|
2
3
|
import { BaseCompound } from "../API/BaseCompound";
|
|
3
4
|
import { Position } from "../API/Geography/Position";
|
|
@@ -8,7 +9,7 @@ import { ILabelled } from "../API/Interfaces/ILabelled";
|
|
|
8
9
|
import { INamed } from "../API/Interfaces/INamed";
|
|
9
10
|
import { IPictured } from "../API/Interfaces/IPictured";
|
|
10
11
|
import { ISuspendable } from "../API/Interfaces/ISuspendable";
|
|
11
|
-
import { codified, double, ulong } from "../API/Types";
|
|
12
|
+
import { JsonObject, codified, colour, double, ulong, ushort } from "../API/Types";
|
|
12
13
|
import { Company } from "../Companies/Company";
|
|
13
14
|
import { Icon } from "../Images/Icon";
|
|
14
15
|
import { Picture } from "../Images/Picture";
|
|
@@ -19,17 +20,11 @@ import { AssetDispatch } from "./AssetDispatch";
|
|
|
19
20
|
import { AssetGeneral } from "./AssetGeneral";
|
|
20
21
|
import { AssetPlaceStatus } from "./AssetPlaceStatus";
|
|
21
22
|
import { AssetType } from "./AssetType";
|
|
22
|
-
import { Vehicle } from "./Vehicle";
|
|
23
23
|
/**
|
|
24
24
|
* The full details of an Asset, containing all the properties from the {@link AssetGeneral} and {@link AssetAdvanced} objects.
|
|
25
25
|
*/
|
|
26
26
|
export declare class Asset extends BaseCompound implements IIdUlong, INamed, IIconic, IBelongCompany, ILabelled, IPictured, ISuspendable {
|
|
27
27
|
#private;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @param json
|
|
31
|
-
*/
|
|
32
|
-
static fromJSON(json: any): Asset | Vehicle;
|
|
33
28
|
/**
|
|
34
29
|
*
|
|
35
30
|
*/
|
|
@@ -107,6 +102,52 @@ export declare class Asset extends BaseCompound implements IIdUlong, INamed, IIc
|
|
|
107
102
|
*/
|
|
108
103
|
get references(): Map<string, string>;
|
|
109
104
|
set references(value: Map<string, string>);
|
|
105
|
+
/**
|
|
106
|
+
* Contact information for this user.
|
|
107
|
+
* {@link Contact.id}
|
|
108
|
+
*/
|
|
109
|
+
get contactId(): ulong;
|
|
110
|
+
set contactId(value: ulong);
|
|
111
|
+
/**
|
|
112
|
+
* Contact information for this user.
|
|
113
|
+
* {@link Contact.id}
|
|
114
|
+
*/
|
|
115
|
+
get contact(): Contact;
|
|
116
|
+
set contact(value: Contact);
|
|
117
|
+
/**
|
|
118
|
+
* The license plate.
|
|
119
|
+
*/
|
|
120
|
+
get plate(): string;
|
|
121
|
+
/**
|
|
122
|
+
* Manufacturer's unique identification number (Vehicle Identification Number).
|
|
123
|
+
*/
|
|
124
|
+
get vin(): string;
|
|
125
|
+
set vin(value: string);
|
|
126
|
+
/**
|
|
127
|
+
* Manufacturer's name.
|
|
128
|
+
*/
|
|
129
|
+
get make(): string;
|
|
130
|
+
set make(value: string);
|
|
131
|
+
/**
|
|
132
|
+
* Manufacturer's model name/number.
|
|
133
|
+
*/
|
|
134
|
+
get model(): string;
|
|
135
|
+
set model(value: string);
|
|
136
|
+
/**
|
|
137
|
+
* Year of manufacturing.
|
|
138
|
+
*/
|
|
139
|
+
get year(): ushort;
|
|
140
|
+
set year(value: ushort);
|
|
141
|
+
/**
|
|
142
|
+
* Primary colour of the trailer (given in 24bit hex; #RRGGBB)
|
|
143
|
+
*/
|
|
144
|
+
get colour(): colour;
|
|
145
|
+
set colour(value: colour);
|
|
146
|
+
/**
|
|
147
|
+
* Manufacturer's unique identification number for this trailer.
|
|
148
|
+
*/
|
|
149
|
+
get serial(): string;
|
|
150
|
+
set serial(value: string);
|
|
110
151
|
/**
|
|
111
152
|
*
|
|
112
153
|
*/
|
|
@@ -157,30 +198,21 @@ export declare class Asset extends BaseCompound implements IIdUlong, INamed, IIc
|
|
|
157
198
|
*/
|
|
158
199
|
get places(): Map<ulong, AssetPlaceStatus>;
|
|
159
200
|
set places(value: Map<ulong, AssetPlaceStatus>);
|
|
201
|
+
/**
|
|
202
|
+
* The cumulative duration that the vehicle's engine has been running (in decimal hours).
|
|
203
|
+
*/
|
|
204
|
+
get engineHours(): double;
|
|
205
|
+
set engineHours(value: double);
|
|
160
206
|
/**
|
|
161
207
|
*
|
|
162
208
|
*/
|
|
163
209
|
get dispatch(): AssetDispatch;
|
|
164
|
-
toJSON():
|
|
165
|
-
|
|
166
|
-
messagingAddress?: string | undefined;
|
|
167
|
-
references?: object | undefined;
|
|
168
|
-
suspended?: boolean | undefined;
|
|
169
|
-
since?: string | null | undefined;
|
|
170
|
-
id: number | null;
|
|
171
|
-
company: number;
|
|
172
|
-
kind: AssetType;
|
|
173
|
-
name: string;
|
|
174
|
-
notes: string;
|
|
175
|
-
icon: number;
|
|
176
|
-
labels: string[];
|
|
177
|
-
v: number[];
|
|
178
|
-
};
|
|
179
|
-
fromJSON(json: any, force?: boolean): boolean;
|
|
210
|
+
toJSON(): JsonObject;
|
|
211
|
+
fromJSON(json: JsonObject, force?: boolean): boolean;
|
|
180
212
|
/**
|
|
181
213
|
* The {@link id} is the key.
|
|
182
214
|
*/
|
|
183
|
-
getKey():
|
|
215
|
+
getKey(): number;
|
|
184
216
|
/**
|
|
185
217
|
* Indicates whether this object is suspended from event processing.
|
|
186
218
|
*/
|
|
@@ -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 { codified, double, ulong } from "../API/Types";
|
|
5
|
+
import { JsonObject, codified, double, ulong } from "../API/Types";
|
|
6
6
|
import { Company } from "../Companies/Company";
|
|
7
7
|
import { Provider } from "../Providers/Provider";
|
|
8
8
|
import { Asset } from "./Asset";
|
|
@@ -12,11 +12,6 @@ import { AssetPlaceStatus } from "./AssetPlaceStatus";
|
|
|
12
12
|
* Often changing details about a thing.
|
|
13
13
|
*/
|
|
14
14
|
export declare class AssetAdvanced extends BaseComponent implements IIdUlong, IBelongCompany {
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @param json
|
|
18
|
-
*/
|
|
19
|
-
static fromJSON(json: any): AssetAdvanced;
|
|
20
15
|
/**
|
|
21
16
|
* Unique identifier of this asset.
|
|
22
17
|
* {@link Asset.id}
|
|
@@ -70,21 +65,14 @@ export declare class AssetAdvanced extends BaseComponent implements IIdUlong, IB
|
|
|
70
65
|
* The current state of this asset's interaction with known {@link Place}s.
|
|
71
66
|
*/
|
|
72
67
|
places: Map<ulong, AssetPlaceStatus>;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
tags: string[];
|
|
80
|
-
attributes: object;
|
|
81
|
-
providers: string[];
|
|
82
|
-
relationships: number[];
|
|
83
|
-
places: object;
|
|
84
|
-
};
|
|
85
|
-
fromJSON(json: any, force?: boolean): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* The cumulative duration that the vehicle's engine has been running (in decimal hours).
|
|
70
|
+
*/
|
|
71
|
+
engineHours: double;
|
|
72
|
+
toJSON(): JsonObject;
|
|
73
|
+
fromJSON(json: JsonObject, force?: boolean): boolean;
|
|
86
74
|
/**
|
|
87
75
|
* The {@link id} is the key.
|
|
88
76
|
*/
|
|
89
|
-
getKey():
|
|
77
|
+
getKey(): number;
|
|
90
78
|
}
|