@trakit/objects 0.0.15 → 0.0.16

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 (222) hide show
  1. package/Accounts/User.d.ts +25 -4
  2. package/Assets/Asset.d.ts +1 -3
  3. package/Companies/Company.d.ts +1 -20
  4. package/Providers/Provider.d.ts +1 -12
  5. package/README.md +24 -24
  6. package/index.d.ts +1 -1
  7. package/objects/API/Arrays.d.ts +46 -0
  8. package/objects/API/Base.d.ts +19 -0
  9. package/objects/API/BaseComponent.d.ts +40 -0
  10. package/objects/API/BaseCompound.d.ts +19 -0
  11. package/objects/API/Codifier.d.ts +15 -0
  12. package/objects/API/Constants.d.ts +39 -0
  13. package/objects/API/Conversion.d.ts +255 -0
  14. package/objects/API/Encoding.d.ts +9 -0
  15. package/objects/API/Files.d.ts +21 -0
  16. package/objects/API/Functions.d.ts +196 -0
  17. package/objects/API/Geography/Functions.d.ts +236 -0
  18. package/objects/API/Geography/Interfaces.d.ts +150 -0
  19. package/objects/API/Geography/LatLng.d.ts +86 -0
  20. package/objects/API/Geography/LatLngBounds.d.ts +146 -0
  21. package/objects/API/Geography/Position.d.ts +74 -0
  22. package/objects/API/Geography/StreetAddress.d.ts +59 -0
  23. package/objects/API/Geometry/Functions.d.ts +114 -0
  24. package/objects/API/Geometry/Interfaces.d.ts +111 -0
  25. package/objects/API/Geometry/Point.d.ts +81 -0
  26. package/objects/API/Geometry/Radial.d.ts +110 -0
  27. package/objects/API/Geometry/Rectangle.d.ts +159 -0
  28. package/objects/API/Geometry/Size.d.ts +58 -0
  29. package/objects/API/Guid.d.ts +4 -0
  30. package/objects/API/Interfaces/IAmCompany.d.ts +11 -0
  31. package/objects/API/Interfaces/IBelongAsset.d.ts +15 -0
  32. package/objects/API/Interfaces/IBelongBillingProfile.d.ts +15 -0
  33. package/objects/API/Interfaces/IBelongCompany.d.ts +15 -0
  34. package/objects/API/Interfaces/IDeserializable.d.ts +13 -0
  35. package/objects/API/Interfaces/IEnabled.d.ts +10 -0
  36. package/objects/API/Interfaces/IFileSize.d.ts +9 -0
  37. package/objects/API/Interfaces/IGlobal.d.ts +11 -0
  38. package/objects/API/Interfaces/IHavePermissions.d.ts +20 -0
  39. package/objects/API/Interfaces/IHavePreferences.d.ts +29 -0
  40. package/objects/API/Interfaces/IIconic.d.ts +15 -0
  41. package/objects/API/Interfaces/IIdUlong.d.ts +10 -0
  42. package/objects/API/Interfaces/ILabelled.d.ts +10 -0
  43. package/objects/API/Interfaces/INamed.d.ts +13 -0
  44. package/objects/API/Interfaces/IPictured.d.ts +15 -0
  45. package/objects/API/Interfaces/IRequestable.d.ts +22 -0
  46. package/objects/API/Interfaces/ISerializable.d.ts +10 -0
  47. package/objects/API/Interfaces/ISuspendable.d.ts +16 -0
  48. package/objects/API/Interfaces/IVisual.d.ts +18 -0
  49. package/objects/API/Maps.d.ts +28 -0
  50. package/objects/API/Objects.d.ts +5 -0
  51. package/objects/API/SearchPattern.d.ts +46 -0
  52. package/objects/API/TimeSpan.d.ts +109 -0
  53. package/objects/API/Timezone.d.ts +44 -0
  54. package/objects/API/Timezones.d.ts +7 -0
  55. package/objects/API/Types.d.ts +132 -0
  56. package/objects/Accounts/Contact.d.ts +139 -0
  57. package/objects/Accounts/Machine.d.ts +139 -0
  58. package/objects/Accounts/MultiFactorType.d.ts +17 -0
  59. package/objects/Accounts/NotificationMethod.d.ts +17 -0
  60. package/objects/Accounts/Permissions/Authorizer.d.ts +204 -0
  61. package/objects/Accounts/Permissions/Permission.d.ts +56 -0
  62. package/objects/Accounts/Permissions/PermissionEscalation.d.ts +41 -0
  63. package/objects/Accounts/Permissions/PermissionEscalationState.d.ts +19 -0
  64. package/objects/Accounts/Permissions/PermissionEscalationType.d.ts +13 -0
  65. package/objects/Accounts/Permissions/PermissionLevel.d.ts +17 -0
  66. package/objects/Accounts/Permissions/PermissionMethod.d.ts +13 -0
  67. package/objects/Accounts/Permissions/PermissionType.d.ts +280 -0
  68. package/objects/Accounts/SSOIdentityProvider.d.ts +25 -0
  69. package/objects/Accounts/Session.d.ts +89 -0
  70. package/objects/Accounts/SessionStatus.d.ts +29 -0
  71. package/objects/Accounts/SystemsOfUnits.d.ts +13 -0
  72. package/objects/Accounts/User.d.ts +167 -0
  73. package/objects/Accounts/UserAdvanced.d.ts +53 -0
  74. package/objects/Accounts/UserAuthentication.d.ts +55 -0
  75. package/objects/Accounts/UserGeneral.d.ts +98 -0
  76. package/objects/Accounts/UserGroup.d.ts +51 -0
  77. package/objects/Accounts/UserMFA.d.ts +47 -0
  78. package/objects/Accounts/UserNotifications.d.ts +76 -0
  79. package/objects/Accounts/UserSSO.d.ts +37 -0
  80. package/objects/Assets/Asset.d.ts +218 -0
  81. package/objects/Assets/AssetAdvanced.d.ts +77 -0
  82. package/objects/Assets/AssetAttribute.d.ts +71 -0
  83. package/objects/Assets/AssetDispatch.d.ts +55 -0
  84. package/objects/Assets/AssetGeneral.d.ts +127 -0
  85. package/objects/Assets/AssetPlaceStatus.d.ts +31 -0
  86. package/objects/Assets/AssetPlaceStatusType.d.ts +17 -0
  87. package/objects/Assets/AssetType.d.ts +21 -0
  88. package/objects/Behaviours/Behaviour.d.ts +78 -0
  89. package/objects/Behaviours/BehaviourLog.d.ts +95 -0
  90. package/objects/Behaviours/BehaviourLogType.d.ts +21 -0
  91. package/objects/Behaviours/BehaviourParameter.d.ts +38 -0
  92. package/objects/Behaviours/BehaviourParameterType.d.ts +21 -0
  93. package/objects/Behaviours/BehaviourScript.d.ts +83 -0
  94. package/objects/Billing/BillableBase.d.ts +83 -0
  95. package/objects/Billing/BillableSmsProfile.d.ts +26 -0
  96. package/objects/Billing/BillingCurrency.d.ts +17 -0
  97. package/objects/Billing/BillingCycle.d.ts +17 -0
  98. package/objects/Billing/BillingProfile.d.ts +104 -0
  99. package/objects/Billing/Hosting/BillableHostingBase.d.ts +41 -0
  100. package/objects/Billing/Hosting/BillableHostingLicense.d.ts +30 -0
  101. package/objects/Billing/Hosting/BillableHostingLicenseType.d.ts +20 -0
  102. package/objects/Billing/Hosting/BillableHostingRule.d.ts +30 -0
  103. package/objects/Billing/Hosting/BillableHostingType.d.ts +41 -0
  104. package/objects/Billing/Report/BillingReport.d.ts +112 -0
  105. package/objects/Billing/Report/BillingReportBreakdown.d.ts +34 -0
  106. package/objects/Billing/Report/BillingReportHostingSummary.d.ts +36 -0
  107. package/objects/Billing/Report/BillingReportLicenseBreakdown.d.ts +79 -0
  108. package/objects/Billing/Report/BillingReportServiceBreakdown.d.ts +124 -0
  109. package/objects/Billing/Report/BillingReportStatus.d.ts +25 -0
  110. package/objects/Billing/Report/BillingReportSummary.d.ts +49 -0
  111. package/objects/Companies/ColourStyle.d.ts +25 -0
  112. package/objects/Companies/Company.d.ts +167 -0
  113. package/objects/Companies/CompanyDirectory.d.ts +52 -0
  114. package/objects/Companies/CompanyGeneral.d.ts +55 -0
  115. package/objects/Companies/CompanyPolicy.d.ts +66 -0
  116. package/objects/Companies/CompanyReseller.d.ts +166 -0
  117. package/objects/Companies/CompanyStyle.d.ts +50 -0
  118. package/objects/Companies/LabelStyle.d.ts +46 -0
  119. package/objects/Companies/NotificationServerEmail.d.ts +99 -0
  120. package/objects/Companies/NotificationServerSms.d.ts +25 -0
  121. package/objects/Companies/PasswordExpiryMode.d.ts +17 -0
  122. package/objects/Companies/PasswordPolicy.d.ts +51 -0
  123. package/objects/Companies/SessionMultiUser.d.ts +17 -0
  124. package/objects/Companies/SessionPolicy.d.ts +47 -0
  125. package/objects/Dispatch/DispatchDirection.d.ts +53 -0
  126. package/objects/Dispatch/DispatchJob.d.ts +107 -0
  127. package/objects/Dispatch/DispatchJobPriority.d.ts +25 -0
  128. package/objects/Dispatch/DispatchStep.d.ts +99 -0
  129. package/objects/Dispatch/DispatchStepState.d.ts +27 -0
  130. package/objects/Dispatch/DispatchStepStatus.d.ts +21 -0
  131. package/objects/Dispatch/DispatchTask.d.ts +154 -0
  132. package/objects/Dispatch/DispatchTaskStatus.d.ts +50 -0
  133. package/objects/Hosting/Document.d.ts +70 -0
  134. package/objects/Hosting/Fields/FormFieldAttachments.d.ts +31 -0
  135. package/objects/Hosting/Fields/FormFieldBase.d.ts +56 -0
  136. package/objects/Hosting/Fields/FormFieldBase_fromJSON.d.ts +1 -0
  137. package/objects/Hosting/Fields/FormFieldBoolean.d.ts +38 -0
  138. package/objects/Hosting/Fields/FormFieldChoice.d.ts +46 -0
  139. package/objects/Hosting/Fields/FormFieldDate.d.ts +26 -0
  140. package/objects/Hosting/Fields/FormFieldNumeric.d.ts +54 -0
  141. package/objects/Hosting/Fields/FormFieldNumericSize.d.ts +32 -0
  142. package/objects/Hosting/Fields/FormFieldSignature.d.ts +17 -0
  143. package/objects/Hosting/Fields/FormFieldText.d.ts +32 -0
  144. package/objects/Hosting/Fields/FormFieldTime.d.ts +37 -0
  145. package/objects/Hosting/Fields/FormFieldTimezone.d.ts +14 -0
  146. package/objects/Hosting/FormFieldType.d.ts +127 -0
  147. package/objects/Hosting/FormResult.d.ts +95 -0
  148. package/objects/Hosting/FormTemplate.d.ts +80 -0
  149. package/objects/Images/Dashcam.d.ts +63 -0
  150. package/objects/Images/DashcamBase.d.ts +97 -0
  151. package/objects/Images/DashcamLive.d.ts +36 -0
  152. package/objects/Images/DashcamMediaType.d.ts +17 -0
  153. package/objects/Images/Icon.d.ts +66 -0
  154. package/objects/Images/IconGlyph.d.ts +47 -0
  155. package/objects/Images/IconLabel.d.ts +29 -0
  156. package/objects/Images/IconLayer.d.ts +33 -0
  157. package/objects/Images/Picture.d.ts +72 -0
  158. package/objects/Maintenance/MaintenanceInterval.d.ts +48 -0
  159. package/objects/Maintenance/MaintenanceJob.d.ts +134 -0
  160. package/objects/Maintenance/MaintenanceJobStatus.d.ts +21 -0
  161. package/objects/Maintenance/MaintenanceSchedule.d.ts +118 -0
  162. package/objects/Messaging/AlertPriority.d.ts +17 -0
  163. package/objects/Messaging/AssetAlert.d.ts +29 -0
  164. package/objects/Messaging/AssetMessage.d.ts +40 -0
  165. package/objects/Messaging/MessageBase.d.ts +99 -0
  166. package/objects/Messaging/MessageFolder.d.ts +13 -0
  167. package/objects/Messaging/MessageStatus.d.ts +29 -0
  168. package/objects/Messaging/MessageType.d.ts +33 -0
  169. package/objects/Places/Place.d.ts +114 -0
  170. package/objects/Places/PlaceType.d.ts +25 -0
  171. package/objects/Providers/Config/ProviderConfig.d.ts +70 -0
  172. package/objects/Providers/Config/ProviderRegistration.d.ts +119 -0
  173. package/objects/Providers/Config/ProviderScript.d.ts +86 -0
  174. package/objects/Providers/Config/ProviderScriptBlock.d.ts +41 -0
  175. package/objects/Providers/Config/ProviderScriptParameter.d.ts +49 -0
  176. package/objects/Providers/Config/ProviderScriptParameterType.d.ts +17 -0
  177. package/objects/Providers/Configuration/ProviderConfiguration.d.ts +66 -0
  178. package/objects/Providers/Configuration/ProviderConfigurationNode.d.ts +66 -0
  179. package/objects/Providers/Configuration/ProviderConfigurationType.d.ts +62 -0
  180. package/objects/Providers/Configuration/ProviderGeofenceBase.d.ts +29 -0
  181. package/objects/Providers/Configuration/ProviderGeofenceBase_fromJSON.d.ts +1 -0
  182. package/objects/Providers/Configuration/ProviderGeofenceCircular.d.ts +28 -0
  183. package/objects/Providers/Configuration/ProviderGeofencePoint.d.ts +12 -0
  184. package/objects/Providers/Configuration/ProviderGeofencePolygon.d.ts +23 -0
  185. package/objects/Providers/Configuration/ProviderGeofenceRectangle.d.ts +28 -0
  186. package/objects/Providers/Provider.d.ts +205 -0
  187. package/objects/Providers/ProviderAdvanced.d.ts +50 -0
  188. package/objects/Providers/ProviderCommand.d.ts +36 -0
  189. package/objects/Providers/ProviderCommandStatus.d.ts +29 -0
  190. package/objects/Providers/ProviderCommandType.d.ts +37 -0
  191. package/objects/Providers/ProviderControl.d.ts +41 -0
  192. package/objects/Providers/ProviderData.d.ts +30 -0
  193. package/objects/Providers/ProviderGeneral.d.ts +121 -0
  194. package/objects/Providers/ProviderType.d.ts +106 -0
  195. package/objects/Reports/ReportBreakdown.d.ts +49 -0
  196. package/objects/Reports/ReportBreakdownJob.d.ts +37 -0
  197. package/objects/Reports/ReportBreakdownMessage.d.ts +40 -0
  198. package/objects/Reports/ReportBreakdownTask.d.ts +46 -0
  199. package/objects/Reports/ReportBreakdown_fromJSON.d.ts +1 -0
  200. package/objects/Reports/ReportFilterMode.d.ts +17 -0
  201. package/objects/Reports/ReportNotifications.d.ts +31 -0
  202. package/objects/Reports/ReportOptions.d.ts +52 -0
  203. package/objects/Reports/ReportParameter.d.ts +26 -0
  204. package/objects/Reports/ReportParameterType.d.ts +59 -0
  205. package/objects/Reports/ReportRecurrence.d.ts +54 -0
  206. package/objects/Reports/ReportRecurrenceType.d.ts +34 -0
  207. package/objects/Reports/ReportResult.d.ts +169 -0
  208. package/objects/Reports/ReportResultData.d.ts +17 -0
  209. package/objects/Reports/ReportSchedule.d.ts +111 -0
  210. package/objects/Reports/ReportScorecard.d.ts +38 -0
  211. package/objects/Reports/ReportScorecardParameter.d.ts +31 -0
  212. package/objects/Reports/ReportScorecardRules.d.ts +26 -0
  213. package/objects/Reports/ReportStatus.d.ts +29 -0
  214. package/objects/Reports/ReportSummary.d.ts +90 -0
  215. package/objects/Reports/ReportSummaryReason.d.ts +27 -0
  216. package/objects/Reports/ReportTemplate.d.ts +81 -0
  217. package/objects/Reports/ReportTotal.d.ts +47 -0
  218. package/objects/Reports/ReportType.d.ts +42 -0
  219. package/objects/index.d.ts +406 -0
  220. package/objects/storage.d.ts +176 -0
  221. package/package.json +36 -36
  222. package/trakit-objects.min.js +2 -2
@@ -0,0 +1,11 @@
1
+ import { ulong } from '../Types';
2
+ import { IIdUlong } from './IIdUlong';
3
+ /**
4
+ * An interface for all the Company___ classes.
5
+ */
6
+ export interface IAmCompany extends IIdUlong {
7
+ /**
8
+ * The {@link Company} to which this {@link Company} belongs.
9
+ */
10
+ parentId: ulong;
11
+ }
@@ -0,0 +1,15 @@
1
+ import { Asset } from "../../Assets/Asset";
2
+ import { ulong } from "../Types";
3
+ /**
4
+ * An interface for objects that belong to a single asset.
5
+ */
6
+ export interface IBelongAsset {
7
+ /**
8
+ * The {@link Asset.id} to which this object belongs.
9
+ */
10
+ assetId: ulong;
11
+ /**
12
+ * The {@link Asset} to which this object belongs.
13
+ */
14
+ get asset(): Asset;
15
+ }
@@ -0,0 +1,15 @@
1
+ import { BillingProfile } from "../../Billing/BillingProfile";
2
+ import { ulong } from "../Types";
3
+ /**
4
+ * An interface for objects that belong to a single billing profile.
5
+ */
6
+ export interface IBelongBillingProfile {
7
+ /**
8
+ * The {@link BillingProfile} to which this object belongs.
9
+ */
10
+ get profileId(): ulong;
11
+ /**
12
+ * The {@link BillingProfile} to which this object belongs.
13
+ */
14
+ readonly profile: BillingProfile;
15
+ }
@@ -0,0 +1,15 @@
1
+ import { ulong } from "../Types";
2
+ import { Company } from "../../Companies/Company";
3
+ /**
4
+ * An interface for objects that belong to a single company.
5
+ */
6
+ export interface IBelongCompany {
7
+ /**
8
+ * The {@link Company} to which this object belongs.
9
+ */
10
+ get companyId(): ulong;
11
+ /**
12
+ * The {@link Company} to which this object belongs.
13
+ */
14
+ get company(): Company;
15
+ }
@@ -0,0 +1,13 @@
1
+ import { JsonObject } from "../../API/Types";
2
+ /**
3
+ * An interface for types that are updated using JSON values.
4
+ */
5
+ export interface IDeserializable {
6
+ /**
7
+ * Updates this {@link IDeserializable} from the given input.
8
+ * @param json A JSON value used to update this class.
9
+ * @param forced When true, forces the update.
10
+ * @returns True when an update was completed.
11
+ */
12
+ fromJSON(json: JsonObject, force?: boolean): boolean;
13
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * An interface for objects that can be marked as "enabled".
3
+ * "Enabled" objects remain in the system, but are inactive.
4
+ */
5
+ export interface IEnabled {
6
+ /**
7
+ * Marked as true for objects that have been deleted.
8
+ */
9
+ enabled: boolean;
10
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * An interface for an object's size on a disk.
3
+ */
4
+ export interface IFileSize {
5
+ /**
6
+ * Size (in bytes) of the object on the HDD or SSD.
7
+ */
8
+ bytes: number;
9
+ }
@@ -0,0 +1,11 @@
1
+ import { IBelongCompany } from './IBelongCompany';
2
+ /**
3
+ * An interface for objects that can be marked as "global".
4
+ * "Global" objects can be listed in child companies.
5
+ */
6
+ export interface IGlobal extends IBelongCompany {
7
+ /**
8
+ * Indicates whether this icon is available to child companies.
9
+ */
10
+ global: boolean;
11
+ }
@@ -0,0 +1,20 @@
1
+ import { Permission } from '../../Accounts/Permissions/Permission';
2
+ import { UserGroup } from '../../Accounts/UserGroup';
3
+ import { ulong } from '../Types';
4
+ /**
5
+ * This interface exists so that I can work with Machine and UserAdvanced objects the same way.
6
+ */
7
+ export interface IHavePermissions {
8
+ /**
9
+ * A list of groups to which this object.
10
+ */
11
+ get groups(): UserGroup[];
12
+ /**
13
+ * A list of groups to which this object.
14
+ */
15
+ groupIds: ulong[];
16
+ /**
17
+ * Permission rules which override the group rules.
18
+ */
19
+ permissions: Permission[];
20
+ }
@@ -0,0 +1,29 @@
1
+ import { SystemsOfUnits } from '../../Accounts/SystemsOfUnits';
2
+ import { Timezone } from '../Timezone';
3
+ import { codified } from '../Types';
4
+ /**
5
+ * This interface exists so that I can work with Machine and UserGeneral objects the same way.
6
+ */
7
+ export interface IHavePreferences {
8
+ /**
9
+ * The local timezone for this object.
10
+ */
11
+ timezone: Timezone;
12
+ /**
13
+ * Preferred region/language for the UI and notifications.
14
+ * Valid formats use <ISO 639-1><dash><ISO 3166-2> such as "fr-CA" or "en-US".
15
+ */
16
+ language: codified;
17
+ /**
18
+ * The format strings defining the preferred way to display ambiguous values.
19
+ */
20
+ formats: Map<codified, string>;
21
+ /**
22
+ * Preferred way of displaying ambiguous numbers in the context of measurements.
23
+ */
24
+ measurements: Map<codified, SystemsOfUnits>;
25
+ /**
26
+ * Additional options which do not fit in with the formats or measurements preferences.
27
+ */
28
+ options: Map<codified, string>;
29
+ }
@@ -0,0 +1,15 @@
1
+ import { Icon } from '../../Images/Icon';
2
+ import { ulong } from '../Types';
3
+ /**
4
+ * An interface for objcts that have an "icon".
5
+ */
6
+ export interface IIconic {
7
+ /**
8
+ * This thing's {@link Icon.id}.
9
+ */
10
+ iconId: ulong;
11
+ /**
12
+ * This thing's {@link Icon}.
13
+ */
14
+ get icon(): Icon;
15
+ }
@@ -0,0 +1,10 @@
1
+ import { ulong } from '../Types';
2
+ /**
3
+ * An interface for objects with a ulong "id".
4
+ */
5
+ export interface IIdUlong {
6
+ /**
7
+ * Unique identifier of this object.
8
+ */
9
+ id: ulong;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { codified } from "../Types";
2
+ /**
3
+ * An interface for objects that have "labels".
4
+ */
5
+ export interface ILabelled {
6
+ /**
7
+ * A list of codified labels for this asset or place.
8
+ */
9
+ labels: codified[];
10
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * An interface for objects that have a "name" and "notes".
3
+ */
4
+ export interface INamed {
5
+ /**
6
+ * This thing's name.
7
+ */
8
+ name: string;
9
+ /**
10
+ * This thing's notes.
11
+ */
12
+ notes: string;
13
+ }
@@ -0,0 +1,15 @@
1
+ import { ulong } from '../Types';
2
+ import { Picture } from '../../Images/Picture';
3
+ /**
4
+ * An interface for objects that have "pictures".
5
+ */
6
+ export interface IPictured {
7
+ /**
8
+ * An array of picture identifiers of this object.
9
+ */
10
+ pictureIds: ulong[];
11
+ /**
12
+ * An array of {@link Picture}s of this object.
13
+ */
14
+ get pictures(): Picture[];
15
+ }
@@ -0,0 +1,22 @@
1
+ import { codified, email, guid, ulong } from "../Types";
2
+ /**
3
+ * The main interface for an object in the Trak-iT system.
4
+ */
5
+ export interface IRequestable {
6
+ /**
7
+ * Returns a unique identifier as a string.
8
+ * {@link Dashcam.guid}
9
+ * {@link IIdUlong.id}
10
+ * {@link Machine.key}
11
+ * {@link Provider.id}
12
+ * {@link ProviderGeneral.id}
13
+ * {@link ProviderAdvanced.id}
14
+ * {@link ProviderControl.id}
15
+ * {@link ProviderRegistration.code}
16
+ * {@link User.login}
17
+ * {@link UserGeneral.login}
18
+ * {@link UserAdvanced.login}
19
+ * {@link Timezone.code}
20
+ */
21
+ getKey(): ulong | email | guid | codified | string;
22
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * An interface for types that can be converted to JSON for transmission or storage.
3
+ */
4
+ export interface ISerializable {
5
+ /**
6
+ * Creates a literal of this {@link ISerializable} object.
7
+ * Used internally by {@link JSON.stringify}.
8
+ */
9
+ toJSON(): any;
10
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * An interface for objects that can be marked as "suspended".
3
+ * "Suspended" objects can be "revived", but are otherwise treated as "achived" or "inert" (events are not processed).
4
+ */
5
+ export interface ISuspendable {
6
+ /**
7
+ * Marked as true for objects that have been suspended.
8
+ * This value is not present in the JSON scheme when {@link deleted} is false.
9
+ */
10
+ suspended?: boolean;
11
+ /**
12
+ * A timestamp from when the object was most recently suspended or revived.
13
+ * This value is not present in the JSON scheme when {@link suspended} is false.
14
+ */
15
+ since?: Date;
16
+ }
@@ -0,0 +1,18 @@
1
+ import { codified, colour } from "../Types";
2
+ /**
3
+ * An interface for objects that make them more easily visually identifiable.
4
+ */
5
+ export interface IVisual {
6
+ /**
7
+ * The background colour of the graphic.
8
+ */
9
+ fill: colour;
10
+ /**
11
+ * Outline and graphic colour.
12
+ */
13
+ stroke: colour;
14
+ /**
15
+ * The name of the symbol for this object.
16
+ */
17
+ graphic: codified;
18
+ }
@@ -0,0 +1,28 @@
1
+ import { IBelongAsset } from './Interfaces/IBelongAsset';
2
+ import { IBelongBillingProfile } from './Interfaces/IBelongBillingProfile';
3
+ import { IBelongCompany } from './Interfaces/IBelongCompany';
4
+ import { ulong } from './Types';
5
+ /**
6
+ * Returns an array of values where the {@link Map}'s key is present in the {@link keys} array.
7
+ * @param map Map of objects to filter.
8
+ * @param keys Array of keys to select.
9
+ */
10
+ export declare function MAP_FILTERED_BY_KEYS<K, T>(map: Map<K, T>, keys: K[]): T[];
11
+ /**
12
+ * Returns an array of values where the `value.companyId` matches the given {@link companyId}.
13
+ * @param map Map of objects to filter.
14
+ * @param companyId {@link Company.id} used to filter.
15
+ */
16
+ export declare function MAP_FILTERED_BY_COMPANY<K, T extends IBelongCompany>(map: Map<K, T>, companyId: ulong): T[];
17
+ /**
18
+ * Returns an array of values where the `value.assetId` matches the given {@link assetId}.
19
+ * @param map Map of objects to filter.
20
+ * @param assetId {@link Asset.id} used to filter.
21
+ */
22
+ export declare function MAP_FILTERED_BY_ASSET<K, T extends IBelongAsset>(map: Map<K, T>, assetId: ulong): T[];
23
+ /**
24
+ * Returns an array of values where the `value.profileId` matches the given {@link profileId}.
25
+ * @param map Map of objects to filter.
26
+ * @param profileId {@link BillingProfile.id} used to filter.
27
+ */
28
+ export declare function MAP_FILTERED_BY_BILLING<K, T extends IBelongBillingProfile>(map: Map<K, T>, profileId: ulong): T[];
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Used internally by {@link MERGE}.
3
+ * @param value
4
+ */
5
+ export declare function MERGE_INTERNAL(value: any): any;
@@ -0,0 +1,46 @@
1
+ import { nothing } from './Types';
2
+ /**
3
+ * A common structure used to implement searching throughout the system.
4
+ * The input format is described in the {@link /wss/#format-expression|WebSocket reference}.
5
+ */
6
+ export declare class SearchPattern {
7
+ /**
8
+ * Creates an array of {@link SearchPattern}s for easier matching. Used for doing OR matching.
9
+ * @param expression
10
+ */
11
+ static parse(expression?: string | nothing): SearchPattern[];
12
+ /**
13
+ * Creates a single string from the given array of {@link SearchPattern}s for easier serialization.
14
+ * @param patterns
15
+ */
16
+ static stringify(patterns?: SearchPattern[] | nothing): string | null;
17
+ /**
18
+ * To help qualify matches, all operators must match for the search to be
19
+ * considered matched.
20
+ * Operators are formatted as "operator:terms".
21
+ */
22
+ operators: Map<string, string[]>;
23
+ /**
24
+ * If any term matches, then the search should be considered matched.
25
+ * Terms are any string contained by single/double-quotes or not parsed as an
26
+ * operator.
27
+ */
28
+ terms: string[];
29
+ constructor(pattern?: string);
30
+ /**
31
+ * True when this pattern will match all.
32
+ */
33
+ get wildcard(): boolean;
34
+ /**
35
+ * Returns a re-parseable string representation of the pattern.
36
+ */
37
+ toString(): string;
38
+ /**
39
+ *
40
+ */
41
+ toJSON: () => string;
42
+ /**
43
+ * Returns a new, identical instance of the pattern.
44
+ */
45
+ copy(): SearchPattern;
46
+ }
@@ -0,0 +1,109 @@
1
+ import { nothing, timespan } from "./Types";
2
+ /**
3
+ * An object which represents an interval of time.
4
+ */
5
+ export declare class TimeSpan {
6
+ #private;
7
+ /**
8
+ * Constructs a new TimeSpan with the value specified in days.
9
+ */
10
+ static fromDays(value: number): TimeSpan;
11
+ /**
12
+ * Constructs a new TimeSpan with the value specified in hours.
13
+ */
14
+ static fromHours(value: number): TimeSpan;
15
+ /**
16
+ * Constructs a new TimeSpan with the value specified in minutes.
17
+ */
18
+ static fromMinutes(value: number): TimeSpan;
19
+ /**
20
+ * Constructs a new TimeSpan with the value specified in seconds.
21
+ */
22
+ static fromSeconds(value: number): TimeSpan;
23
+ /**
24
+ * Constructs a new TimeSpan with the value specified in milliseconds.
25
+ */
26
+ static fromMilliseconds(value: number): TimeSpan;
27
+ /**
28
+ * @param duration A time-span formatted string, or a number representing milliseconds
29
+ */
30
+ constructor(duration?: TimeSpan | timespan | number | nothing);
31
+ /**
32
+ * Days component of the time-span.
33
+ */
34
+ get days(): number;
35
+ /**
36
+ * Hours component of the time-span.
37
+ */
38
+ get hours(): number;
39
+ /**
40
+ * Minutes component of the time-span.
41
+ */
42
+ get minutes(): number;
43
+ /**
44
+ * Seconds component of the time-span.
45
+ */
46
+ get seconds(): number;
47
+ /**
48
+ * Millisecond component of the time-span.
49
+ */
50
+ get milliseconds(): number;
51
+ /**
52
+ * Total time-span value in decimal days.
53
+ */
54
+ get totalDays(): number;
55
+ /**
56
+ * Total time-span value in decimal hours.
57
+ */
58
+ get totalHours(): number;
59
+ /**
60
+ * Total time-span value in decimal minutes.
61
+ */
62
+ get totalMinutes(): number;
63
+ /**
64
+ * Total time-span value in decimal seconds.
65
+ */
66
+ get totalSeconds(): number;
67
+ /**
68
+ * Total time-span value in milliseconds.
69
+ */
70
+ get totalMilliseconds(): number;
71
+ /**
72
+ * Parses the time-span into a serialized TimeSpan string.
73
+ * The format follows the {@link timespan} definition.
74
+ * @param format Use format strings like "HH:mm" for just hours and minutes. Valid flags are d, h, H, m, s, and f. If you use
75
+ */
76
+ toString(format?: timespan): timespan;
77
+ /**
78
+ * Same as {@link TimeSpan#toString}.
79
+ */
80
+ toJSON: (format?: timespan) => timespan;
81
+ /**
82
+ * Gets the comparable value of this time-span as total milliseconds.
83
+ */
84
+ valueOf(): number;
85
+ /**
86
+ * Adds the given value to the current time-span.
87
+ * @param duration A time-span formatted string, or a number representing milliseconds
88
+ * @param subtract When true, the value is subtracted from the time-span instead of added.
89
+ */
90
+ add(duration: TimeSpan | timespan | number, subtract?: boolean): number;
91
+ /**
92
+ * Subtracts the given value from the time-span.
93
+ * @param duration A time-span formatted string, or a number representing milliseconds
94
+ * @param add When true, the value is added from the time-span instead of subtracted.
95
+ */
96
+ subtract(duration: TimeSpan | timespan | number, add?: boolean): number;
97
+ }
98
+ /**
99
+ * Parses a serialized TimeSpan into a number representing the total seconds.
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.
101
+ * @param duration A valid timespan string. The format is [-]( d | [d.]hh:mm[:ss[.fff]] )
102
+ */
103
+ export declare function TIMESPAN_PARSE(duration: TimeSpan | timespan | number): number;
104
+ /**
105
+ * Parses a number representing the total seconds into a serialized TimeSpan string.
106
+ * For example the number 114123.467 would be serialized as "1.07:42:03.467".
107
+ * @param value Use a decimal to show milliseconds.
108
+ */
109
+ export declare function TIMESPAN_STRINGIFY(value: number): timespan;
@@ -0,0 +1,44 @@
1
+ import { IRequestable } from "./Interfaces/IRequestable";
2
+ import { ISerializable } from "./Interfaces/ISerializable";
3
+ import { short, JsonObject } from "./Types";
4
+ /**
5
+ * Timezone definition
6
+ */
7
+ export declare class Timezone implements IRequestable, ISerializable {
8
+ /**
9
+ *
10
+ * @param json
11
+ */
12
+ static fromJSON(json: JsonObject): Timezone;
13
+ /**
14
+ *
15
+ */
16
+ static utc: Timezone;
17
+ /**
18
+ * Unique timezone code
19
+ */
20
+ code: string;
21
+ /**
22
+ * Common timezone name
23
+ */
24
+ name: string;
25
+ /**
26
+ * Minutes offset from GMT
27
+ */
28
+ offset: short;
29
+ /**
30
+ * Indicates whether this timezone abides by daylight savings
31
+ */
32
+ dst: boolean;
33
+ constructor(code: string, name?: string, offset?: short, dst?: boolean);
34
+ toJSON(): {
35
+ code: string;
36
+ name: string;
37
+ offset: number;
38
+ dst: boolean;
39
+ };
40
+ /**
41
+ * The {@link code} is the key.
42
+ */
43
+ getKey(): string;
44
+ }
@@ -0,0 +1,7 @@
1
+ import { Timezone } from './Timezone';
2
+ import { codified } from './Types';
3
+ /**
4
+ *
5
+ * @param code
6
+ */
7
+ export declare function TIMEZONE_FIND(code: codified): Timezone | undefined;