@trakit/objects 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/API/Arrays.d.ts +46 -0
  2. package/API/Base.d.ts +18 -0
  3. package/API/BaseComponent.d.ts +37 -0
  4. package/API/BaseCompound.d.ts +19 -0
  5. package/API/Codifier.d.ts +5 -0
  6. package/API/Component.d.ts +42 -0
  7. package/API/Compound.d.ts +19 -0
  8. package/API/Constants.d.ts +39 -0
  9. package/API/Conversion.d.ts +255 -0
  10. package/API/Files.d.ts +21 -0
  11. package/API/Functions.d.ts +191 -0
  12. package/API/Geography/Functions.d.ts +232 -0
  13. package/API/Geography/Interfaces.d.ts +145 -0
  14. package/API/Geography/LatLng.d.ts +78 -0
  15. package/API/Geography/LatLngBounds.d.ts +145 -0
  16. package/API/Geography/Position.d.ts +62 -0
  17. package/API/Geography/StreetAddress.d.ts +58 -0
  18. package/API/Geometry/Functions.d.ts +114 -0
  19. package/API/Geometry/Interfaces.d.ts +111 -0
  20. package/API/Geometry/Point.d.ts +80 -0
  21. package/API/Geometry/Radial.d.ts +109 -0
  22. package/API/Geometry/Rectangle.d.ts +163 -0
  23. package/API/Geometry/Size.d.ts +52 -0
  24. package/API/Guid.d.ts +4 -0
  25. package/API/Interfaces/IAmCompany.d.ts +11 -0
  26. package/API/Interfaces/IBelongAsset.d.ts +15 -0
  27. package/API/Interfaces/IBelongBillingProfile.d.ts +15 -0
  28. package/API/Interfaces/IBelongCompany.d.ts +15 -0
  29. package/API/Interfaces/IDeserializable.d.ts +12 -0
  30. package/API/Interfaces/IEnabled.d.ts +10 -0
  31. package/API/Interfaces/IFileSize.d.ts +9 -0
  32. package/API/Interfaces/IGlobal.d.ts +11 -0
  33. package/API/Interfaces/IHavePermissions.d.ts +20 -0
  34. package/API/Interfaces/IHavePreferences.d.ts +29 -0
  35. package/API/Interfaces/IIconic.d.ts +15 -0
  36. package/API/Interfaces/IIdUlong.d.ts +10 -0
  37. package/API/Interfaces/ILabelled.d.ts +9 -0
  38. package/API/Interfaces/INamed.d.ts +13 -0
  39. package/API/Interfaces/IPictured.d.ts +15 -0
  40. package/API/Interfaces/IRequestable.d.ts +18 -0
  41. package/API/Interfaces/ISerializable.d.ts +10 -0
  42. package/API/Interfaces/ISuspendable.d.ts +16 -0
  43. package/API/Interfaces/IVisual.d.ts +18 -0
  44. package/API/Maps.d.ts +28 -0
  45. package/API/Objects.d.ts +33 -0
  46. package/API/SearchPattern.d.ts +45 -0
  47. package/API/TimeSpan.d.ts +140 -0
  48. package/API/Timezone.d.ts +44 -0
  49. package/API/Timezones.d.ts +7 -0
  50. package/API/Types.d.ts +114 -0
  51. package/Accounts/Contact.d.ts +140 -0
  52. package/Accounts/Machine.d.ts +131 -0
  53. package/Accounts/NotificationMethod.d.ts +17 -0
  54. package/Accounts/Permissions/Authorizer.d.ts +204 -0
  55. package/Accounts/Permissions/Permission.d.ts +57 -0
  56. package/Accounts/Permissions/PermissionEscalation.d.ts +33 -0
  57. package/Accounts/Permissions/PermissionEscalationState.d.ts +17 -0
  58. package/Accounts/Permissions/PermissionEscalationType.d.ts +13 -0
  59. package/Accounts/Permissions/PermissionLevel.d.ts +17 -0
  60. package/Accounts/Permissions/PermissionMethod.d.ts +13 -0
  61. package/Accounts/Permissions/PermissionType.d.ts +280 -0
  62. package/Accounts/Session.d.ts +92 -0
  63. package/Accounts/SessionStatus.d.ts +29 -0
  64. package/Accounts/SystemsOfUnits.d.ts +13 -0
  65. package/Accounts/User.d.ts +147 -0
  66. package/Accounts/UserAdvanced.d.ts +54 -0
  67. package/Accounts/UserGeneral.d.ts +100 -0
  68. package/Accounts/UserGroup.d.ts +52 -0
  69. package/Accounts/UserNotifications.d.ts +76 -0
  70. package/Assets/Asset.d.ts +192 -0
  71. package/Assets/AssetAdvanced.d.ts +90 -0
  72. package/Assets/AssetAttribute.d.ts +71 -0
  73. package/Assets/AssetDispatch.d.ts +63 -0
  74. package/Assets/AssetGeneral.d.ts +109 -0
  75. package/Assets/AssetPlaceStatus.d.ts +31 -0
  76. package/Assets/AssetPlaceStatusType.d.ts +17 -0
  77. package/Assets/AssetType.d.ts +21 -0
  78. package/Assets/Person.d.ts +25 -0
  79. package/Assets/PersonGeneral.d.ts +35 -0
  80. package/Assets/Trailer.d.ts +42 -0
  81. package/Assets/TrailerGeneral.d.ts +47 -0
  82. package/Assets/Vehicle.d.ts +73 -0
  83. package/Assets/VehicleAdvanced.d.ts +25 -0
  84. package/Assets/VehicleGeneral.d.ts +33 -0
  85. package/Behaviours/Behaviour.d.ts +79 -0
  86. package/Behaviours/BehaviourLog.d.ts +97 -0
  87. package/Behaviours/BehaviourLogType.d.ts +21 -0
  88. package/Behaviours/BehaviourParameter.d.ts +37 -0
  89. package/Behaviours/BehaviourParameterType.d.ts +21 -0
  90. package/Behaviours/BehaviourScript.d.ts +84 -0
  91. package/Billing/BillableBase.d.ts +85 -0
  92. package/Billing/BillableSmsProfile.d.ts +26 -0
  93. package/Billing/BillingCurrency.d.ts +17 -0
  94. package/Billing/BillingCycle.d.ts +17 -0
  95. package/Billing/BillingProfile.d.ts +107 -0
  96. package/Billing/Hosting/BillableHostingBase.d.ts +41 -0
  97. package/Billing/Hosting/BillableHostingDiscount.d.ts +35 -0
  98. package/Billing/Hosting/BillableHostingLicense.d.ts +29 -0
  99. package/Billing/Hosting/BillableHostingLicenseType.d.ts +20 -0
  100. package/Billing/Hosting/BillableHostingRule.d.ts +29 -0
  101. package/Billing/Hosting/BillableHostingType.d.ts +41 -0
  102. package/Billing/Report/BillingReport.d.ts +114 -0
  103. package/Billing/Report/BillingReportBreakdown.d.ts +35 -0
  104. package/Billing/Report/BillingReportHostingSummary.d.ts +36 -0
  105. package/Billing/Report/BillingReportLicenseBreakdown.d.ts +80 -0
  106. package/Billing/Report/BillingReportServiceBreakdown.d.ts +126 -0
  107. package/Billing/Report/BillingReportStatus.d.ts +25 -0
  108. package/Billing/Report/BillingReportSummary.d.ts +51 -0
  109. package/Companies/ColourStyle.d.ts +25 -0
  110. package/Companies/Company.d.ts +150 -0
  111. package/Companies/CompanyDirectory.d.ts +49 -0
  112. package/Companies/CompanyGeneral.d.ts +51 -0
  113. package/Companies/CompanyPolicies.d.ts +62 -0
  114. package/Companies/CompanyReseller.d.ts +163 -0
  115. package/Companies/CompanyStyles.d.ts +46 -0
  116. package/Companies/LabelStyle.d.ts +46 -0
  117. package/Companies/NotificationServerEmail.d.ts +99 -0
  118. package/Companies/NotificationServerSms.d.ts +25 -0
  119. package/Companies/PasswordExpiryMode.d.ts +17 -0
  120. package/Companies/PasswordPolicy.d.ts +51 -0
  121. package/Companies/SessionMultiUser.d.ts +17 -0
  122. package/Companies/SessionPolicy.d.ts +47 -0
  123. package/Dispatch/DispatchDirection.d.ts +53 -0
  124. package/Dispatch/DispatchJob.d.ts +109 -0
  125. package/Dispatch/DispatchJobPriority.d.ts +25 -0
  126. package/Dispatch/DispatchStep.d.ts +99 -0
  127. package/Dispatch/DispatchStepState.d.ts +27 -0
  128. package/Dispatch/DispatchStepStatus.d.ts +21 -0
  129. package/Dispatch/DispatchTask.d.ts +156 -0
  130. package/Dispatch/DispatchTaskStatus.d.ts +50 -0
  131. package/Hosting/Document.d.ts +71 -0
  132. package/Hosting/Fields/FormFieldAttachments.d.ts +38 -0
  133. package/Hosting/Fields/FormFieldBase.d.ts +71 -0
  134. package/Hosting/Fields/FormFieldBoolean.d.ts +46 -0
  135. package/Hosting/Fields/FormFieldChoice.d.ts +48 -0
  136. package/Hosting/Fields/FormFieldDate.d.ts +33 -0
  137. package/Hosting/Fields/FormFieldNumeric.d.ts +61 -0
  138. package/Hosting/Fields/FormFieldNumericSize.d.ts +32 -0
  139. package/Hosting/Fields/FormFieldSignature.d.ts +17 -0
  140. package/Hosting/Fields/FormFieldText.d.ts +39 -0
  141. package/Hosting/Fields/FormFieldTime.d.ts +34 -0
  142. package/Hosting/Fields/FormFieldTimezone.d.ts +14 -0
  143. package/Hosting/FormFieldType.d.ts +127 -0
  144. package/Hosting/FormResult.d.ts +97 -0
  145. package/Hosting/FormTemplate.d.ts +81 -0
  146. package/Images/Dashcam.d.ts +70 -0
  147. package/Images/DashcamBase.d.ts +98 -0
  148. package/Images/DashcamLive.d.ts +43 -0
  149. package/Images/DashcamMediaType.d.ts +17 -0
  150. package/Images/Icon.d.ts +87 -0
  151. package/Images/IconGlyph.d.ts +54 -0
  152. package/Images/IconLabel.d.ts +32 -0
  153. package/Images/IconLayer.d.ts +33 -0
  154. package/Images/Picture.d.ts +73 -0
  155. package/Maintenance/MaintenanceInterval.d.ts +49 -0
  156. package/Maintenance/MaintenanceJob.d.ts +137 -0
  157. package/Maintenance/MaintenanceJobStatus.d.ts +21 -0
  158. package/Maintenance/MaintenanceSchedule.d.ts +119 -0
  159. package/Messaging/AlertPriority.d.ts +17 -0
  160. package/Messaging/AssetAlert.d.ts +28 -0
  161. package/Messaging/AssetMessage.d.ts +40 -0
  162. package/Messaging/MessageBase.d.ts +101 -0
  163. package/Messaging/MessageFolder.d.ts +13 -0
  164. package/Messaging/MessageStatus.d.ts +29 -0
  165. package/Messaging/MessageType.d.ts +33 -0
  166. package/Places/Place.d.ts +116 -0
  167. package/Places/PlaceType.d.ts +25 -0
  168. package/Providers/Config/ProviderConfig.d.ts +72 -0
  169. package/Providers/Config/ProviderRegistration.d.ts +123 -0
  170. package/Providers/Config/ProviderScript.d.ts +87 -0
  171. package/Providers/Config/ProviderScriptBlock.d.ts +40 -0
  172. package/Providers/Config/ProviderScriptParameter.d.ts +49 -0
  173. package/Providers/Config/ProviderScriptParameterType.d.ts +17 -0
  174. package/Providers/Configuration/ProviderConfiguration.d.ts +68 -0
  175. package/Providers/Configuration/ProviderConfigurationNode.d.ts +65 -0
  176. package/Providers/Configuration/ProviderConfigurationType.d.ts +62 -0
  177. package/Providers/Configuration/ProviderGeofenceBase.d.ts +31 -0
  178. package/Providers/Configuration/ProviderGeofenceCircular.d.ts +28 -0
  179. package/Providers/Configuration/ProviderGeofencePoint.d.ts +12 -0
  180. package/Providers/Configuration/ProviderGeofencePolygon.d.ts +23 -0
  181. package/Providers/Configuration/ProviderGeofenceRectangle.d.ts +28 -0
  182. package/Providers/Provider.d.ts +145 -0
  183. package/Providers/ProviderAdvanced.d.ts +51 -0
  184. package/Providers/ProviderCommand.d.ts +36 -0
  185. package/Providers/ProviderCommandStatus.d.ts +29 -0
  186. package/Providers/ProviderCommandType.d.ts +37 -0
  187. package/Providers/ProviderControl.d.ts +42 -0
  188. package/Providers/ProviderData.d.ts +30 -0
  189. package/Providers/ProviderGeneral.d.ts +117 -0
  190. package/Providers/ProviderType.d.ts +106 -0
  191. package/README.md +13 -0
  192. package/Reports/ReportBreakdown.d.ts +72 -0
  193. package/Reports/ReportBreakdownJob.d.ts +62 -0
  194. package/Reports/ReportBreakdownMessage.d.ts +65 -0
  195. package/Reports/ReportBreakdownTask.d.ts +71 -0
  196. package/Reports/ReportDataTotal.d.ts +50 -0
  197. package/Reports/ReportFilterMode.d.ts +17 -0
  198. package/Reports/ReportNotifications.d.ts +31 -0
  199. package/Reports/ReportOptions.d.ts +51 -0
  200. package/Reports/ReportParameter.d.ts +25 -0
  201. package/Reports/ReportParameterType.d.ts +59 -0
  202. package/Reports/ReportRecurrence.d.ts +54 -0
  203. package/Reports/ReportRecurrenceType.d.ts +34 -0
  204. package/Reports/ReportResult.d.ts +170 -0
  205. package/Reports/ReportResultData.d.ts +17 -0
  206. package/Reports/ReportSchedule.d.ts +112 -0
  207. package/Reports/ReportScorecard.d.ts +39 -0
  208. package/Reports/ReportScorecardParameter.d.ts +31 -0
  209. package/Reports/ReportScorecardRules.d.ts +26 -0
  210. package/Reports/ReportStatus.d.ts +29 -0
  211. package/Reports/ReportSummary.d.ts +119 -0
  212. package/Reports/ReportSummaryReason.d.ts +27 -0
  213. package/Reports/ReportTemplate.d.ts +82 -0
  214. package/Reports/ReportTotal.d.ts +48 -0
  215. package/Reports/ReportType.d.ts +42 -0
  216. package/Storage.d.ts +166 -0
  217. package/objects.d.ts +534 -0
  218. package/objects.min.js +7 -0
  219. package/package.json +22 -0
@@ -0,0 +1,42 @@
1
+ import { ushort } from '../API/Types';
2
+ import { Asset } from './Asset';
3
+ import { TrailerGeneral } from './TrailerGeneral';
4
+ /**
5
+ * The full details of a Trailer, containing all the properties from the {@link TrailerGeneral} and {@link AssetAdvanced} objects.
6
+ */
7
+ export declare class Trailer extends Asset {
8
+ /**
9
+ * General details about this vehicle.
10
+ */
11
+ get general(): TrailerGeneral;
12
+ /**
13
+ * Manufacturer's unique identification number for this trailer.
14
+ */
15
+ get serial(): string;
16
+ set serial(value: string);
17
+ /**
18
+ * The license plate.
19
+ */
20
+ get plate(): string;
21
+ set plate(value: string);
22
+ /**
23
+ * Manufacturer's name.
24
+ */
25
+ get make(): string;
26
+ set make(value: string);
27
+ /**
28
+ * Manufacturer's model name/number.
29
+ */
30
+ get model(): string;
31
+ set model(value: string);
32
+ /**
33
+ * Year of manufacturing.
34
+ */
35
+ get year(): ushort;
36
+ set year(value: ushort);
37
+ /**
38
+ * Primary colour of the vehicle (given in 24bit hex; #RRGGBB)
39
+ */
40
+ get colour(): string;
41
+ set colour(value: string);
42
+ }
@@ -0,0 +1,47 @@
1
+ import { colour, ushort } from "../API/Types";
2
+ import { AssetGeneral } from "./AssetGeneral";
3
+ /**
4
+ * Seldom changing details about a trailer.
5
+ */
6
+ export declare class TrailerGeneral extends AssetGeneral {
7
+ /**
8
+ * The license plate.
9
+ */
10
+ plate: string;
11
+ /**
12
+ * Manufacturer's unique identification number for this trailer.
13
+ */
14
+ serial: string;
15
+ /**
16
+ * Manufacturer's name.
17
+ */
18
+ make: string;
19
+ /**
20
+ * Manufacturer's model name/number.
21
+ */
22
+ model: string;
23
+ /**
24
+ * Year of manufacturing.
25
+ */
26
+ year: ushort;
27
+ /**
28
+ * Primary colour of the trailer (given in 24bit hex; #RRGGBB)
29
+ */
30
+ colour: colour;
31
+ toJSON(): {
32
+ suspended?: boolean | undefined;
33
+ since?: string | null | undefined;
34
+ references?: object | undefined;
35
+ messagingAddress?: string | undefined;
36
+ pictures?: number[] | undefined;
37
+ id: number | null;
38
+ v: number[];
39
+ company: number;
40
+ kind: import("./AssetType").AssetType;
41
+ name: string;
42
+ notes: string;
43
+ icon: number;
44
+ labels: string[];
45
+ };
46
+ fromJSON(json: any, force?: boolean): boolean;
47
+ }
@@ -0,0 +1,73 @@
1
+ import { colour, double, ushort } from "../API/Types";
2
+ import { Asset } from "./Asset";
3
+ import { VehicleGeneral } from "./VehicleGeneral";
4
+ import { VehicleAdvanced } from "./VehicleAdvanced";
5
+ /**
6
+ * The full details of a Vehicle, containing all the properties from the {@link VehicleGeneral} and {@link VehicleAdvanced} objects.
7
+ */
8
+ export declare class Vehicle extends Asset {
9
+ /**
10
+ * General details about this vehicle.
11
+ */
12
+ get general(): VehicleGeneral;
13
+ /**
14
+ * Advanced details about this vehicle.
15
+ */
16
+ get advanced(): VehicleAdvanced;
17
+ /**
18
+ * The license plate.
19
+ */
20
+ get plate(): string;
21
+ /**
22
+ * Manufacturer's unique identification number (Vehicle Identification Number).
23
+ */
24
+ get vin(): string;
25
+ set vin(value: string);
26
+ /**
27
+ * Manufacturer's name.
28
+ */
29
+ get make(): string;
30
+ set make(value: string);
31
+ /**
32
+ * Manufacturer's model name/number.
33
+ */
34
+ get model(): string;
35
+ set model(value: string);
36
+ /**
37
+ * Year of manufacturing.
38
+ */
39
+ get year(): ushort;
40
+ set year(value: ushort);
41
+ /**
42
+ * Primary colour of the trailer (given in 24bit hex; #RRGGBB)
43
+ */
44
+ get colour(): colour;
45
+ set colour(value: colour);
46
+ /**
47
+ * The cumulative duration that the vehicle's engine has been running (in decimal hours).
48
+ */
49
+ get engineHours(): double;
50
+ set engineHours(value: double);
51
+ toJSON(): {
52
+ engineHours: number;
53
+ plate: string;
54
+ vin: string;
55
+ make: string;
56
+ model: string;
57
+ year: number;
58
+ colour: string;
59
+ id: number | null;
60
+ v: number[];
61
+ company: number;
62
+ kind: import("./AssetType").AssetType;
63
+ name: string;
64
+ notes: string;
65
+ icon: number;
66
+ labels: string[];
67
+ suspended?: boolean | undefined;
68
+ since?: string | null | undefined;
69
+ references?: object | undefined;
70
+ messagingAddress?: string | undefined;
71
+ pictures?: number[] | undefined;
72
+ };
73
+ }
@@ -0,0 +1,25 @@
1
+ import { double } from "../API/Types";
2
+ import { AssetAdvanced } from "./AssetAdvanced";
3
+ /**
4
+ * Often changing details about a vehicle.
5
+ */
6
+ export declare class VehicleAdvanced extends AssetAdvanced {
7
+ /**
8
+ * The cumulative duration that the vehicle's engine has been running (in decimal hours).
9
+ */
10
+ engineHours: double;
11
+ toJSON(): {
12
+ engineHours: number | null;
13
+ id: number | null;
14
+ v: number[];
15
+ company: number;
16
+ position: import("../API/Geography/Interfaces").IPosition | null;
17
+ odometer: number;
18
+ tags: string[];
19
+ attributes: object;
20
+ providers: string[];
21
+ relationships: number[];
22
+ places: object;
23
+ };
24
+ fromJSON(json: any, force?: boolean): boolean;
25
+ }
@@ -0,0 +1,33 @@
1
+ import { colour, ushort } from "../API/Types";
2
+ import { AssetGeneral } from "./AssetGeneral";
3
+ /**
4
+ * Seldom changing details about a vehicle.
5
+ */
6
+ export declare class VehicleGeneral extends AssetGeneral {
7
+ /**
8
+ * Manufacturer's unique identification number (Vehicle Identification Number).
9
+ */
10
+ vin: string;
11
+ /**
12
+ * The license plate.
13
+ */
14
+ plate: string;
15
+ /**
16
+ * Manufacturer's name.
17
+ */
18
+ make: string;
19
+ /**
20
+ * Manufacturer's model name/number.
21
+ */
22
+ model: string;
23
+ /**
24
+ * Year of manufacturing.
25
+ */
26
+ year: ushort;
27
+ /**
28
+ * Primary colour of the vehicle (given in 24bit hex; #RRGGBB)
29
+ */
30
+ colour: colour;
31
+ toJSON(): any;
32
+ fromJSON(json: any, force?: boolean): boolean;
33
+ }
@@ -0,0 +1,79 @@
1
+ import { BaseComponent } from "../API/BaseComponent";
2
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
+ import { IIdUlong } from "../API/Interfaces/IIdUlong";
4
+ import { INamed } from "../API/Interfaces/INamed";
5
+ import { SearchPattern } from "../API/SearchPattern";
6
+ import { byte, ulong } from "../API/Types";
7
+ import { Company } from "../Companies/Company";
8
+ import { BehaviourParameter } from "./BehaviourParameter";
9
+ import { BehaviourScript } from "./BehaviourScript";
10
+ /**
11
+ * The applied behaviour which includes all parameters and targets specific assets.
12
+ */
13
+ export declare class Behaviour extends BaseComponent implements IIdUlong, INamed, IBelongCompany {
14
+ /**
15
+ * Unique identifier of this behaviour.
16
+ */
17
+ id: ulong;
18
+ /**
19
+ * The company to which this behaviour belongs.
20
+ * {@link Company.id}
21
+ */
22
+ companyId: ulong;
23
+ /**
24
+ * The company to which this behaviour belongs.
25
+ * {@link Company.id}
26
+ */
27
+ get company(): Company;
28
+ /**
29
+ * The script which this behaviour implements.
30
+ * {@link BehaviourScript.id}
31
+ */
32
+ scriptId: ulong;
33
+ /**
34
+ * The script which this behaviour implements.
35
+ * {@link BehaviourScript.id}
36
+ */
37
+ get script(): BehaviourScript;
38
+ /**
39
+ * The name of this behaviour.
40
+ */
41
+ name: string;
42
+ /**
43
+ * Notes.
44
+ */
45
+ notes: string;
46
+ /**
47
+ * The priority flag allows you to define an execution order for all behaviours for a provider.
48
+ */
49
+ priority: byte;
50
+ /**
51
+ * The search pattern used to target the assets which will embed this behaviour in their execution context.
52
+ */
53
+ targets: SearchPattern[] | null;
54
+ /**
55
+ * A search pattern used to filter the providers which can implement this behaviour.
56
+ */
57
+ filters: SearchPattern[] | null;
58
+ /**
59
+ * The list of defined variable name/value pairs for the script requires.
60
+ */
61
+ parameters: Map<string, BehaviourParameter>;
62
+ toJSON(): {
63
+ id: number | null;
64
+ v: number[];
65
+ company: number | null;
66
+ script: number | null;
67
+ name: string;
68
+ notes: string;
69
+ targets: string | null;
70
+ filters: string | null;
71
+ priority: number;
72
+ parameters: object;
73
+ };
74
+ fromJSON(json: any, force?: boolean): boolean;
75
+ /**
76
+ * The {@link id} is the key.
77
+ */
78
+ getKey(): string;
79
+ }
@@ -0,0 +1,97 @@
1
+ import { BaseComponent } from "../API/BaseComponent";
2
+ import { IBelongAsset } from "../API/Interfaces/IBelongAsset";
3
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
+ import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
+ import { uint, ulong } from "../API/Types";
6
+ import { Asset } from "../Assets/Asset";
7
+ import { Company } from "../Companies/Company";
8
+ import { Behaviour } from "./Behaviour";
9
+ import { BehaviourLogType } from "./BehaviourLogType";
10
+ import { BehaviourScript } from "./BehaviourScript";
11
+ /**
12
+ * A debug message available to script writers to help debug and trace output from a BehaviourScript.
13
+ */
14
+ export declare class BehaviourLog extends BaseComponent implements IIdUlong, IBelongCompany, IBelongAsset {
15
+ /**
16
+ * Unique identifier of this log message.
17
+ */
18
+ id: ulong;
19
+ /**
20
+ * The asset which whose behaviours created this log entry.
21
+ * {@link Asset.id}
22
+ */
23
+ assetId: ulong;
24
+ /**
25
+ * The company to which this log message belongs.
26
+ * {@link Company.id}
27
+ */
28
+ get asset(): Asset;
29
+ /**
30
+ * The company to which this log message belongs.
31
+ * {@link Company.id}
32
+ */
33
+ companyId: ulong;
34
+ /**
35
+ * The company to which this log message belongs.
36
+ * {@link Company.id}
37
+ */
38
+ get company(): Company;
39
+ /**
40
+ * The behaviour to which this log message belongs.
41
+ * {@link Behaviour.id}
42
+ */
43
+ behaviourId: ulong;
44
+ /**
45
+ * The behaviour to which this log message belongs.
46
+ * {@link Behaviour.id}
47
+ */
48
+ get behaviour(): Behaviour;
49
+ /**
50
+ * The script which generated this log message.
51
+ * {@link BehaviourScript.id}
52
+ */
53
+ scriptId: ulong;
54
+ /**
55
+ * The script which generated this log message.
56
+ * {@link BehaviourScript.id}
57
+ */
58
+ get script(): BehaviourScript;
59
+ /**
60
+ * The category of message.
61
+ */
62
+ kind: BehaviourLogType;
63
+ /**
64
+ * When the log entry was generated by the script.
65
+ */
66
+ dts: Date;
67
+ /**
68
+ * The body of the message.
69
+ */
70
+ message: string;
71
+ /**
72
+ * The line number of the script which generated this message.
73
+ */
74
+ line: uint;
75
+ /**
76
+ * The character column where the error was generated.
77
+ */
78
+ character: uint;
79
+ toJSON(): {
80
+ id: number | null;
81
+ v: number[];
82
+ asset: number | null;
83
+ company: number | null;
84
+ behaviour: number | null;
85
+ script: number | null;
86
+ kind: BehaviourLogType;
87
+ dts: string | null;
88
+ message: string;
89
+ line: number;
90
+ character: number;
91
+ };
92
+ fromJSON(json: any, force?: boolean): boolean;
93
+ /**
94
+ * The {@link id} is the key.
95
+ */
96
+ getKey(): string;
97
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The type of logged message.
3
+ */
4
+ export declare enum BehaviourLogType {
5
+ /**
6
+ * Used for general information messages.
7
+ */
8
+ log = "log",
9
+ /**
10
+ * Used for more important messages.
11
+ */
12
+ info = "info",
13
+ /**
14
+ * Used for warnings.
15
+ */
16
+ warn = "warn",
17
+ /**
18
+ * Used for errors.
19
+ */
20
+ err = "err"
21
+ }
@@ -0,0 +1,37 @@
1
+ import { ISerializable } from "../API/Interfaces/ISerializable";
2
+ import { BehaviourParameterType } from "./BehaviourParameterType";
3
+ /**
4
+ * Definition of an argument passed to a Behaviour Script.
5
+ */
6
+ export declare class BehaviourParameter implements ISerializable {
7
+ /**
8
+ *
9
+ * @param json
10
+ * @returns
11
+ */
12
+ static fromJSON(json: any): BehaviourParameter;
13
+ /**
14
+ * Simple type information for the compiler.
15
+ */
16
+ kind: BehaviourParameterType;
17
+ /**
18
+ * The value is given as a string, but parsed into native type when compiled.
19
+ */
20
+ value: string;
21
+ /**
22
+ * Usage notes.
23
+ */
24
+ notes: string;
25
+ /**
26
+ * Gives a hint to the client on the best UI to use for editing.
27
+ * For example, "checkbox" is a good UI hint for boolean parameter types.
28
+ */
29
+ context: string;
30
+ constructor(kind?: BehaviourParameterType, value?: string, notes?: string, context?: string);
31
+ toJSON(): {
32
+ kind: BehaviourParameterType;
33
+ value: string;
34
+ notes: string;
35
+ context: string;
36
+ };
37
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Possible data-types given to BehaviourParameters.
3
+ */
4
+ export declare enum BehaviourParameterType {
5
+ /**
6
+ * True or false.
7
+ */
8
+ boolean = "boolean",
9
+ /**
10
+ * Numeric value (signed double-precision floating point number).
11
+ */
12
+ number = "number",
13
+ /**
14
+ * Text.
15
+ */
16
+ text = "text",
17
+ /**
18
+ * Object or array literal.
19
+ */
20
+ json = "json"
21
+ }
@@ -0,0 +1,84 @@
1
+ import { BaseComponent } from "../API/BaseComponent";
2
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
+ import { IGlobal } from "../API/Interfaces/IGlobal";
4
+ import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
+ import { INamed } from "../API/Interfaces/INamed";
6
+ import { IVisual } from "../API/Interfaces/IVisual";
7
+ import { SearchPattern } from "../API/SearchPattern";
8
+ import { codified, colour, ulong } from "../API/Types";
9
+ import { Company } from "../Companies/Company";
10
+ import { BehaviourParameter } from "./BehaviourParameter";
11
+ /**
12
+ * Business logic run by the system to react to GPS events and device information.
13
+ */
14
+ export declare class BehaviourScript extends BaseComponent implements IIdUlong, INamed, IBelongCompany, IGlobal, IVisual {
15
+ /**
16
+ * Unique identifier of this script.
17
+ */
18
+ id: ulong;
19
+ /**
20
+ * The company to which this script belongs.
21
+ * {@link Company.id}
22
+ */
23
+ companyId: ulong;
24
+ /**
25
+ * The company to which this script belongs.
26
+ * {@link Company.id}
27
+ */
28
+ get company(): Company;
29
+ /**
30
+ * The nickname given to this script.
31
+ */
32
+ name: string;
33
+ /**
34
+ * Usage notes and instructions for users on how best to setup this script.
35
+ */
36
+ notes: string;
37
+ /**
38
+ * Indicates whether this script is available to child companies.
39
+ */
40
+ global: boolean;
41
+ /**
42
+ * The source code.
43
+ */
44
+ source: string;
45
+ /**
46
+ * A list of targeting expressions. These expressions are defaults for derived Behaviours.
47
+ */
48
+ filters: SearchPattern[] | null;
49
+ /**
50
+ * Listed parameters for the Behaviour function.
51
+ */
52
+ parameters: Map<string, BehaviourParameter>;
53
+ /**
54
+ * The background colour given to this script for easy visual identification.
55
+ */
56
+ fill: colour;
57
+ /**
58
+ * The text/graphic colour given to this script for easy visual identification.
59
+ */
60
+ stroke: colour;
61
+ /**
62
+ * The codified graphic name given to this script for easy visual identification.
63
+ */
64
+ graphic: codified;
65
+ toJSON(): {
66
+ id: number | null;
67
+ v: number[];
68
+ company: number | null;
69
+ name: string;
70
+ notes: string;
71
+ global: boolean;
72
+ source: string;
73
+ filters: string | null;
74
+ parameters: object;
75
+ fill: string;
76
+ stroke: string;
77
+ graphic: string;
78
+ };
79
+ fromJSON(json: any, force?: boolean): boolean;
80
+ /**
81
+ * The {@link id} is the key.
82
+ */
83
+ getKey(): string;
84
+ }
@@ -0,0 +1,85 @@
1
+ import { BaseComponent } from "../API/BaseComponent";
2
+ import { IBelongBillingProfile } from "../API/Interfaces/IBelongBillingProfile";
3
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
+ import { IIdUlong } from "../API/Interfaces/IIdUlong";
5
+ import { INamed } from "../API/Interfaces/INamed";
6
+ import { double, ulong } from "../API/Types";
7
+ import { Company } from "../Companies/Company";
8
+ import { BillingProfile } from "./BillingProfile";
9
+ /**
10
+ * Most billable things share common attibutes.
11
+ */
12
+ export declare abstract class BillableBase extends BaseComponent implements IIdUlong, INamed, IBelongBillingProfile, IBelongCompany {
13
+ /**
14
+ * Unique identifier of this hosting rule.
15
+ */
16
+ id: ulong;
17
+ /**
18
+ * Unique identifier of the Company that owns this hosting rule.
19
+ * {@link Company.id}
20
+ */
21
+ companyId: ulong;
22
+ /**
23
+ * Unique identifier of the Company that owns this hosting rule.
24
+ * {@link Company.id}
25
+ */
26
+ get company(): Company;
27
+ /**
28
+ * Unique identifier of this rule's billing profile.
29
+ * {@link BillingProfile.id}
30
+ */
31
+ profileId: ulong;
32
+ /**
33
+ * Unique identifier of this rule's billing profile.
34
+ * {@link BillingProfile.id}
35
+ */
36
+ get profile(): BillingProfile;
37
+ /**
38
+ * The name of this billing rule.
39
+ */
40
+ name: string;
41
+ /**
42
+ * Notes about billing this rule.
43
+ */
44
+ notes: string;
45
+ /**
46
+ * A custom field used to refer to an external system. Examples are a cost codes, SOCs, discount plans...
47
+ */
48
+ reference: string;
49
+ /**
50
+ * SKU or SOC code.
51
+ */
52
+ sku: string;
53
+ /**
54
+ * Date this billing rule takes effect.
55
+ * These dates are used to determine how much of the cycle is billed.
56
+ */
57
+ start: Date;
58
+ /**
59
+ * Date this billing rule is applied until; null means it never ends.
60
+ * These dates are used to determine how much of the cycle is billed.
61
+ */
62
+ end: Date;
63
+ /**
64
+ * Cost per cycle for this plan
65
+ */
66
+ amount: double;
67
+ toJSON(): {
68
+ id: number | null;
69
+ v: number[];
70
+ company: number;
71
+ profile: number;
72
+ name: string;
73
+ notes: string;
74
+ reference: string;
75
+ sku: string;
76
+ start: string | null;
77
+ end: string | null;
78
+ amount: number | null;
79
+ };
80
+ fromJSON(json: any, force?: boolean): boolean;
81
+ /**
82
+ * The {@link id} is the key.
83
+ */
84
+ getKey(): string;
85
+ }
@@ -0,0 +1,26 @@
1
+ import { ISerializable } from "../API/Interfaces/ISerializable";
2
+ import { double, uint } from "../API/Types";
3
+ /**
4
+ * Description of a tiered SMS messaging limit
5
+ */
6
+ export declare class BillableSmsProfile implements ISerializable {
7
+ /**
8
+ *
9
+ * @param json
10
+ */
11
+ static fromJSON(json: any): BillableSmsProfile;
12
+ /**
13
+ * The maximum number of messages sent per cycle
14
+ */
15
+ limit: uint;
16
+ /**
17
+ * Cost per SMS message sent.
18
+ * Received messages are free.
19
+ */
20
+ amount: double;
21
+ constructor(limit?: uint, amount?: double);
22
+ toJSON(): {
23
+ limit: number | null;
24
+ amount: number | null;
25
+ };
26
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Used for invoices.
3
+ */
4
+ export declare enum BillingCurrency {
5
+ /**
6
+ * Canadian dollars
7
+ */
8
+ CAD = "CAD",
9
+ /**
10
+ * American dollars
11
+ */
12
+ USD = "USD",
13
+ /**
14
+ * Eurozone currency
15
+ */
16
+ EURO = "EURO"
17
+ }