@trakit/objects 0.0.14 → 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 (275) hide show
  1. package/API/Base.d.ts +1 -6
  2. package/Accounts/Contact.d.ts +2 -2
  3. package/Accounts/Machine.d.ts +2 -1
  4. package/Accounts/Session.d.ts +1 -16
  5. package/Accounts/User.d.ts +2 -3
  6. package/Accounts/UserAdvanced.d.ts +2 -1
  7. package/Accounts/UserAuthentication.d.ts +2 -1
  8. package/Accounts/UserGeneral.d.ts +2 -1
  9. package/Accounts/UserGroup.d.ts +2 -1
  10. package/Assets/Asset.d.ts +35 -5
  11. package/Assets/AssetAdvanced.d.ts +2 -1
  12. package/Assets/AssetDispatch.d.ts +18 -2
  13. package/Assets/AssetGeneral.d.ts +34 -2
  14. package/Behaviours/Behaviour.d.ts +1 -0
  15. package/Behaviours/BehaviourLog.d.ts +1 -0
  16. package/Behaviours/BehaviourScript.d.ts +1 -0
  17. package/Billing/BillingProfile.d.ts +1 -0
  18. package/Billing/Hosting/BillableHostingLicense.d.ts +1 -0
  19. package/Billing/Hosting/BillableHostingRule.d.ts +1 -0
  20. package/Billing/Report/BillingReport.d.ts +1 -0
  21. package/Companies/Company.d.ts +3 -24
  22. package/Companies/CompanyDirectory.d.ts +2 -9
  23. package/Companies/CompanyGeneral.d.ts +2 -1
  24. package/Companies/CompanyPolicy.d.ts +2 -1
  25. package/Companies/CompanyReseller.d.ts +2 -1
  26. package/Companies/CompanyStyle.d.ts +2 -1
  27. package/Dispatch/DispatchJob.d.ts +2 -1
  28. package/Dispatch/DispatchTask.d.ts +1 -0
  29. package/Hosting/Document.d.ts +2 -1
  30. package/Hosting/FormResult.d.ts +2 -1
  31. package/Hosting/FormTemplate.d.ts +2 -1
  32. package/Images/Dashcam.d.ts +3 -2
  33. package/Images/DashcamLive.d.ts +3 -2
  34. package/Images/Icon.d.ts +15 -2
  35. package/Images/Picture.d.ts +2 -1
  36. package/Maintenance/MaintenanceJob.d.ts +2 -1
  37. package/Maintenance/MaintenanceSchedule.d.ts +2 -1
  38. package/Messaging/AssetAlert.d.ts +2 -1
  39. package/Messaging/AssetMessage.d.ts +2 -1
  40. package/Places/Place.d.ts +2 -1
  41. package/Providers/Config/ProviderConfig.d.ts +2 -1
  42. package/Providers/Config/ProviderRegistration.d.ts +2 -1
  43. package/Providers/Config/ProviderScript.d.ts +2 -1
  44. package/Providers/Configuration/ProviderConfiguration.d.ts +2 -1
  45. package/Providers/Configuration/ProviderConfigurationType.d.ts +2 -1
  46. package/Providers/Provider.d.ts +3 -13
  47. package/Providers/ProviderAdvanced.d.ts +2 -1
  48. package/Providers/ProviderControl.d.ts +2 -1
  49. package/Providers/ProviderGeneral.d.ts +2 -1
  50. package/README.md +24 -24
  51. package/Reports/ReportBreakdown.d.ts +32 -1
  52. package/Reports/ReportBreakdownJob.d.ts +32 -1
  53. package/Reports/ReportBreakdownMessage.d.ts +32 -1
  54. package/Reports/ReportBreakdownTask.d.ts +32 -1
  55. package/Reports/ReportResult.d.ts +2 -1
  56. package/Reports/ReportSchedule.d.ts +2 -1
  57. package/Reports/ReportSummary.d.ts +64 -2
  58. package/Reports/ReportTemplate.d.ts +2 -1
  59. package/index.d.ts +1 -1
  60. package/objects/API/Arrays.d.ts +46 -0
  61. package/objects/API/Base.d.ts +19 -0
  62. package/objects/API/BaseComponent.d.ts +40 -0
  63. package/objects/API/BaseCompound.d.ts +19 -0
  64. package/objects/API/Codifier.d.ts +15 -0
  65. package/objects/API/Constants.d.ts +39 -0
  66. package/objects/API/Conversion.d.ts +255 -0
  67. package/objects/API/Encoding.d.ts +9 -0
  68. package/objects/API/Files.d.ts +21 -0
  69. package/objects/API/Functions.d.ts +196 -0
  70. package/objects/API/Geography/Functions.d.ts +236 -0
  71. package/objects/API/Geography/Interfaces.d.ts +150 -0
  72. package/objects/API/Geography/LatLng.d.ts +86 -0
  73. package/objects/API/Geography/LatLngBounds.d.ts +146 -0
  74. package/objects/API/Geography/Position.d.ts +74 -0
  75. package/objects/API/Geography/StreetAddress.d.ts +59 -0
  76. package/objects/API/Geometry/Functions.d.ts +114 -0
  77. package/objects/API/Geometry/Interfaces.d.ts +111 -0
  78. package/objects/API/Geometry/Point.d.ts +81 -0
  79. package/objects/API/Geometry/Radial.d.ts +110 -0
  80. package/objects/API/Geometry/Rectangle.d.ts +159 -0
  81. package/objects/API/Geometry/Size.d.ts +58 -0
  82. package/objects/API/Guid.d.ts +4 -0
  83. package/objects/API/Interfaces/IAmCompany.d.ts +11 -0
  84. package/objects/API/Interfaces/IBelongAsset.d.ts +15 -0
  85. package/objects/API/Interfaces/IBelongBillingProfile.d.ts +15 -0
  86. package/objects/API/Interfaces/IBelongCompany.d.ts +15 -0
  87. package/objects/API/Interfaces/IDeserializable.d.ts +13 -0
  88. package/objects/API/Interfaces/IEnabled.d.ts +10 -0
  89. package/objects/API/Interfaces/IFileSize.d.ts +9 -0
  90. package/objects/API/Interfaces/IGlobal.d.ts +11 -0
  91. package/objects/API/Interfaces/IHavePermissions.d.ts +20 -0
  92. package/objects/API/Interfaces/IHavePreferences.d.ts +29 -0
  93. package/objects/API/Interfaces/IIconic.d.ts +15 -0
  94. package/objects/API/Interfaces/IIdUlong.d.ts +10 -0
  95. package/objects/API/Interfaces/ILabelled.d.ts +10 -0
  96. package/objects/API/Interfaces/INamed.d.ts +13 -0
  97. package/objects/API/Interfaces/IPictured.d.ts +15 -0
  98. package/objects/API/Interfaces/IRequestable.d.ts +22 -0
  99. package/objects/API/Interfaces/ISerializable.d.ts +10 -0
  100. package/objects/API/Interfaces/ISuspendable.d.ts +16 -0
  101. package/objects/API/Interfaces/IVisual.d.ts +18 -0
  102. package/objects/API/Maps.d.ts +28 -0
  103. package/objects/API/Objects.d.ts +5 -0
  104. package/objects/API/SearchPattern.d.ts +46 -0
  105. package/objects/API/TimeSpan.d.ts +109 -0
  106. package/objects/API/Timezone.d.ts +44 -0
  107. package/objects/API/Timezones.d.ts +7 -0
  108. package/objects/API/Types.d.ts +132 -0
  109. package/objects/Accounts/Contact.d.ts +139 -0
  110. package/objects/Accounts/Machine.d.ts +139 -0
  111. package/objects/Accounts/MultiFactorType.d.ts +17 -0
  112. package/objects/Accounts/NotificationMethod.d.ts +17 -0
  113. package/objects/Accounts/Permissions/Authorizer.d.ts +204 -0
  114. package/objects/Accounts/Permissions/Permission.d.ts +56 -0
  115. package/objects/Accounts/Permissions/PermissionEscalation.d.ts +41 -0
  116. package/objects/Accounts/Permissions/PermissionEscalationState.d.ts +19 -0
  117. package/objects/Accounts/Permissions/PermissionEscalationType.d.ts +13 -0
  118. package/objects/Accounts/Permissions/PermissionLevel.d.ts +17 -0
  119. package/objects/Accounts/Permissions/PermissionMethod.d.ts +13 -0
  120. package/objects/Accounts/Permissions/PermissionType.d.ts +280 -0
  121. package/objects/Accounts/SSOIdentityProvider.d.ts +25 -0
  122. package/objects/Accounts/Session.d.ts +89 -0
  123. package/objects/Accounts/SessionStatus.d.ts +29 -0
  124. package/objects/Accounts/SystemsOfUnits.d.ts +13 -0
  125. package/objects/Accounts/User.d.ts +167 -0
  126. package/objects/Accounts/UserAdvanced.d.ts +53 -0
  127. package/objects/Accounts/UserAuthentication.d.ts +55 -0
  128. package/objects/Accounts/UserGeneral.d.ts +98 -0
  129. package/objects/Accounts/UserGroup.d.ts +51 -0
  130. package/objects/Accounts/UserMFA.d.ts +47 -0
  131. package/objects/Accounts/UserNotifications.d.ts +76 -0
  132. package/objects/Accounts/UserSSO.d.ts +37 -0
  133. package/objects/Assets/Asset.d.ts +218 -0
  134. package/objects/Assets/AssetAdvanced.d.ts +77 -0
  135. package/objects/Assets/AssetAttribute.d.ts +71 -0
  136. package/objects/Assets/AssetDispatch.d.ts +55 -0
  137. package/objects/Assets/AssetGeneral.d.ts +127 -0
  138. package/objects/Assets/AssetPlaceStatus.d.ts +31 -0
  139. package/objects/Assets/AssetPlaceStatusType.d.ts +17 -0
  140. package/objects/Assets/AssetType.d.ts +21 -0
  141. package/objects/Behaviours/Behaviour.d.ts +78 -0
  142. package/objects/Behaviours/BehaviourLog.d.ts +95 -0
  143. package/objects/Behaviours/BehaviourLogType.d.ts +21 -0
  144. package/objects/Behaviours/BehaviourParameter.d.ts +38 -0
  145. package/objects/Behaviours/BehaviourParameterType.d.ts +21 -0
  146. package/objects/Behaviours/BehaviourScript.d.ts +83 -0
  147. package/objects/Billing/BillableBase.d.ts +83 -0
  148. package/objects/Billing/BillableSmsProfile.d.ts +26 -0
  149. package/objects/Billing/BillingCurrency.d.ts +17 -0
  150. package/objects/Billing/BillingCycle.d.ts +17 -0
  151. package/objects/Billing/BillingProfile.d.ts +104 -0
  152. package/objects/Billing/Hosting/BillableHostingBase.d.ts +41 -0
  153. package/objects/Billing/Hosting/BillableHostingLicense.d.ts +30 -0
  154. package/objects/Billing/Hosting/BillableHostingLicenseType.d.ts +20 -0
  155. package/objects/Billing/Hosting/BillableHostingRule.d.ts +30 -0
  156. package/objects/Billing/Hosting/BillableHostingType.d.ts +41 -0
  157. package/objects/Billing/Report/BillingReport.d.ts +112 -0
  158. package/objects/Billing/Report/BillingReportBreakdown.d.ts +34 -0
  159. package/objects/Billing/Report/BillingReportHostingSummary.d.ts +36 -0
  160. package/objects/Billing/Report/BillingReportLicenseBreakdown.d.ts +79 -0
  161. package/objects/Billing/Report/BillingReportServiceBreakdown.d.ts +124 -0
  162. package/objects/Billing/Report/BillingReportStatus.d.ts +25 -0
  163. package/objects/Billing/Report/BillingReportSummary.d.ts +49 -0
  164. package/objects/Companies/ColourStyle.d.ts +25 -0
  165. package/objects/Companies/Company.d.ts +167 -0
  166. package/objects/Companies/CompanyDirectory.d.ts +52 -0
  167. package/objects/Companies/CompanyGeneral.d.ts +55 -0
  168. package/objects/Companies/CompanyPolicy.d.ts +66 -0
  169. package/objects/Companies/CompanyReseller.d.ts +166 -0
  170. package/objects/Companies/CompanyStyle.d.ts +50 -0
  171. package/objects/Companies/LabelStyle.d.ts +46 -0
  172. package/objects/Companies/NotificationServerEmail.d.ts +99 -0
  173. package/objects/Companies/NotificationServerSms.d.ts +25 -0
  174. package/objects/Companies/PasswordExpiryMode.d.ts +17 -0
  175. package/objects/Companies/PasswordPolicy.d.ts +51 -0
  176. package/objects/Companies/SessionMultiUser.d.ts +17 -0
  177. package/objects/Companies/SessionPolicy.d.ts +47 -0
  178. package/objects/Dispatch/DispatchDirection.d.ts +53 -0
  179. package/objects/Dispatch/DispatchJob.d.ts +107 -0
  180. package/objects/Dispatch/DispatchJobPriority.d.ts +25 -0
  181. package/objects/Dispatch/DispatchStep.d.ts +99 -0
  182. package/objects/Dispatch/DispatchStepState.d.ts +27 -0
  183. package/objects/Dispatch/DispatchStepStatus.d.ts +21 -0
  184. package/objects/Dispatch/DispatchTask.d.ts +154 -0
  185. package/objects/Dispatch/DispatchTaskStatus.d.ts +50 -0
  186. package/objects/Hosting/Document.d.ts +70 -0
  187. package/objects/Hosting/Fields/FormFieldAttachments.d.ts +31 -0
  188. package/objects/Hosting/Fields/FormFieldBase.d.ts +56 -0
  189. package/objects/Hosting/Fields/FormFieldBase_fromJSON.d.ts +1 -0
  190. package/objects/Hosting/Fields/FormFieldBoolean.d.ts +38 -0
  191. package/objects/Hosting/Fields/FormFieldChoice.d.ts +46 -0
  192. package/objects/Hosting/Fields/FormFieldDate.d.ts +26 -0
  193. package/objects/Hosting/Fields/FormFieldNumeric.d.ts +54 -0
  194. package/objects/Hosting/Fields/FormFieldNumericSize.d.ts +32 -0
  195. package/objects/Hosting/Fields/FormFieldSignature.d.ts +17 -0
  196. package/objects/Hosting/Fields/FormFieldText.d.ts +32 -0
  197. package/objects/Hosting/Fields/FormFieldTime.d.ts +37 -0
  198. package/objects/Hosting/Fields/FormFieldTimezone.d.ts +14 -0
  199. package/objects/Hosting/FormFieldType.d.ts +127 -0
  200. package/objects/Hosting/FormResult.d.ts +95 -0
  201. package/objects/Hosting/FormTemplate.d.ts +80 -0
  202. package/objects/Images/Dashcam.d.ts +63 -0
  203. package/objects/Images/DashcamBase.d.ts +97 -0
  204. package/objects/Images/DashcamLive.d.ts +36 -0
  205. package/objects/Images/DashcamMediaType.d.ts +17 -0
  206. package/objects/Images/Icon.d.ts +66 -0
  207. package/objects/Images/IconGlyph.d.ts +47 -0
  208. package/objects/Images/IconLabel.d.ts +29 -0
  209. package/objects/Images/IconLayer.d.ts +33 -0
  210. package/objects/Images/Picture.d.ts +72 -0
  211. package/objects/Maintenance/MaintenanceInterval.d.ts +48 -0
  212. package/objects/Maintenance/MaintenanceJob.d.ts +134 -0
  213. package/objects/Maintenance/MaintenanceJobStatus.d.ts +21 -0
  214. package/objects/Maintenance/MaintenanceSchedule.d.ts +118 -0
  215. package/objects/Messaging/AlertPriority.d.ts +17 -0
  216. package/objects/Messaging/AssetAlert.d.ts +29 -0
  217. package/objects/Messaging/AssetMessage.d.ts +40 -0
  218. package/objects/Messaging/MessageBase.d.ts +99 -0
  219. package/objects/Messaging/MessageFolder.d.ts +13 -0
  220. package/objects/Messaging/MessageStatus.d.ts +29 -0
  221. package/objects/Messaging/MessageType.d.ts +33 -0
  222. package/objects/Places/Place.d.ts +114 -0
  223. package/objects/Places/PlaceType.d.ts +25 -0
  224. package/objects/Providers/Config/ProviderConfig.d.ts +70 -0
  225. package/objects/Providers/Config/ProviderRegistration.d.ts +119 -0
  226. package/objects/Providers/Config/ProviderScript.d.ts +86 -0
  227. package/objects/Providers/Config/ProviderScriptBlock.d.ts +41 -0
  228. package/objects/Providers/Config/ProviderScriptParameter.d.ts +49 -0
  229. package/objects/Providers/Config/ProviderScriptParameterType.d.ts +17 -0
  230. package/objects/Providers/Configuration/ProviderConfiguration.d.ts +66 -0
  231. package/objects/Providers/Configuration/ProviderConfigurationNode.d.ts +66 -0
  232. package/objects/Providers/Configuration/ProviderConfigurationType.d.ts +62 -0
  233. package/objects/Providers/Configuration/ProviderGeofenceBase.d.ts +29 -0
  234. package/objects/Providers/Configuration/ProviderGeofenceBase_fromJSON.d.ts +1 -0
  235. package/objects/Providers/Configuration/ProviderGeofenceCircular.d.ts +28 -0
  236. package/objects/Providers/Configuration/ProviderGeofencePoint.d.ts +12 -0
  237. package/objects/Providers/Configuration/ProviderGeofencePolygon.d.ts +23 -0
  238. package/objects/Providers/Configuration/ProviderGeofenceRectangle.d.ts +28 -0
  239. package/objects/Providers/Provider.d.ts +205 -0
  240. package/objects/Providers/ProviderAdvanced.d.ts +50 -0
  241. package/objects/Providers/ProviderCommand.d.ts +36 -0
  242. package/objects/Providers/ProviderCommandStatus.d.ts +29 -0
  243. package/objects/Providers/ProviderCommandType.d.ts +37 -0
  244. package/objects/Providers/ProviderControl.d.ts +41 -0
  245. package/objects/Providers/ProviderData.d.ts +30 -0
  246. package/objects/Providers/ProviderGeneral.d.ts +121 -0
  247. package/objects/Providers/ProviderType.d.ts +106 -0
  248. package/objects/Reports/ReportBreakdown.d.ts +49 -0
  249. package/objects/Reports/ReportBreakdownJob.d.ts +37 -0
  250. package/objects/Reports/ReportBreakdownMessage.d.ts +40 -0
  251. package/objects/Reports/ReportBreakdownTask.d.ts +46 -0
  252. package/objects/Reports/ReportBreakdown_fromJSON.d.ts +1 -0
  253. package/objects/Reports/ReportFilterMode.d.ts +17 -0
  254. package/objects/Reports/ReportNotifications.d.ts +31 -0
  255. package/objects/Reports/ReportOptions.d.ts +52 -0
  256. package/objects/Reports/ReportParameter.d.ts +26 -0
  257. package/objects/Reports/ReportParameterType.d.ts +59 -0
  258. package/objects/Reports/ReportRecurrence.d.ts +54 -0
  259. package/objects/Reports/ReportRecurrenceType.d.ts +34 -0
  260. package/objects/Reports/ReportResult.d.ts +169 -0
  261. package/objects/Reports/ReportResultData.d.ts +17 -0
  262. package/objects/Reports/ReportSchedule.d.ts +111 -0
  263. package/objects/Reports/ReportScorecard.d.ts +38 -0
  264. package/objects/Reports/ReportScorecardParameter.d.ts +31 -0
  265. package/objects/Reports/ReportScorecardRules.d.ts +26 -0
  266. package/objects/Reports/ReportStatus.d.ts +29 -0
  267. package/objects/Reports/ReportSummary.d.ts +90 -0
  268. package/objects/Reports/ReportSummaryReason.d.ts +27 -0
  269. package/objects/Reports/ReportTemplate.d.ts +81 -0
  270. package/objects/Reports/ReportTotal.d.ts +47 -0
  271. package/objects/Reports/ReportType.d.ts +42 -0
  272. package/objects/index.d.ts +406 -0
  273. package/objects/storage.d.ts +176 -0
  274. package/package.json +36 -36
  275. package/trakit-objects.min.js +2 -2
@@ -0,0 +1,89 @@
1
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
2
+ import { IDeserializable } from "../API/Interfaces/IDeserializable";
3
+ import { IRequestable } from "../API/Interfaces/IRequestable";
4
+ import { ISerializable } from "../API/Interfaces/ISerializable";
5
+ import { int, JsonObject, nothing, ulong } from "../API/Types";
6
+ import { Company } from "../Companies/Company";
7
+ import { SessionStatus } from "./SessionStatus";
8
+ /**
9
+ * Information about another {@link User}'s {@link Session}.
10
+ */
11
+ export declare class Session implements IBelongCompany, IRequestable, ISerializable, IDeserializable {
12
+ /**
13
+ * A "handle" identifying a resource.
14
+ */
15
+ handle: string;
16
+ /**
17
+ * Getter shortcut for the {@link User}'s {@link Company.id}.
18
+ */
19
+ companyId: ulong;
20
+ /**
21
+ * The {@link Company} to which this contact belongs
22
+ */
23
+ get company(): Company;
24
+ /**
25
+ * The IP address of the {@link User} last used to connect using this session.
26
+ */
27
+ ipAddress: string;
28
+ /**
29
+ * `UserAgent` identification string
30
+ */
31
+ userAgent: string;
32
+ /**
33
+ * The IP address the user last used to connect
34
+ /**
35
+ * The number of currently connected WebSocket clients.
36
+ */
37
+ sockets: int;
38
+ /**
39
+ * The {@link User} to which the {@link Session} belongs.
40
+ * {@link User.login}
41
+ */
42
+ login: string;
43
+ /**
44
+ * This {@link Session}'s current state.
45
+ */
46
+ status: SessionStatus;
47
+ /**
48
+ * The timestamp from the moment this {@link Session} was created.
49
+ */
50
+ created: Date;
51
+ /**
52
+ * A timestamp for when the {@link RespSession} will expire.
53
+ */
54
+ expiry: Date;
55
+ /**
56
+ * The name or path of the last command executed.
57
+ */
58
+ lastCommand: string;
59
+ /**
60
+ * A timestamp from the last command or call to the system.
61
+ */
62
+ lastActivity: Date;
63
+ /**
64
+ * Indicator that this {@link Session} is using at least one WebSocket connection.
65
+ */
66
+ get active(): boolean;
67
+ constructor(json?: JsonObject | nothing);
68
+ fromJSON(json: JsonObject, force?: boolean): boolean;
69
+ /**
70
+ *
71
+ */
72
+ toJSON(): {
73
+ handle: string;
74
+ company: number | null;
75
+ login: string;
76
+ status: SessionStatus;
77
+ userAgent: string;
78
+ ipAddress: string;
79
+ created: string;
80
+ expires: string;
81
+ lastActivity: string;
82
+ lastCommand: string;
83
+ sockets: number;
84
+ };
85
+ /**
86
+ * The {@link handle} is the key.
87
+ */
88
+ getKey(): string;
89
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Current state of a session
3
+ */
4
+ export declare enum SessionStatus {
5
+ /**
6
+ * Invalid session reference.
7
+ */
8
+ notFound = "notFound",
9
+ /**
10
+ * Session created but user hasn't logged-in yet.
11
+ */
12
+ created = "created",
13
+ /**
14
+ * User is logged-in and one or more WebSocket connections are open.
15
+ */
16
+ active = "active",
17
+ /**
18
+ * User is logged-in but no WebSocket connections are open.
19
+ */
20
+ idle = "idle",
21
+ /**
22
+ * User is logged-in and password is expired and needs to be changed before any commands can be processed.
23
+ */
24
+ passwordExpired = "passwordExpired",
25
+ /**
26
+ * Session is being killed because it has expired.
27
+ */
28
+ expired = "expired"
29
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * A type of measurement system
3
+ */
4
+ export declare enum SystemsOfUnits {
5
+ /**
6
+ * Metric
7
+ */
8
+ metric = "metric",
9
+ /**
10
+ * US Standard.
11
+ */
12
+ standard = "standard"
13
+ }
@@ -0,0 +1,167 @@
1
+ import { BaseComponent } from "../API/BaseComponent";
2
+ import { BaseCompound } from "../API/BaseCompound";
3
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
4
+ import { IEnabled } from "../API/Interfaces/IEnabled";
5
+ import { IHavePermissions } from "../API/Interfaces/IHavePermissions";
6
+ import { IHavePreferences } from "../API/Interfaces/IHavePreferences";
7
+ import { Timezone } from "../API/Timezone";
8
+ import { codified, datetimetemplate, email, JsonObject, nothing, ulong } from "../API/Types";
9
+ import { Company } from "../Companies/Company";
10
+ import { Contact } from "./Contact";
11
+ import { Permission } from "./Permissions/Permission";
12
+ import { SystemsOfUnits } from "./SystemsOfUnits";
13
+ import { UserAdvanced } from "./UserAdvanced";
14
+ import { UserAuthentication } from "./UserAuthentication";
15
+ import { UserGeneral } from "./UserGeneral";
16
+ import { UserGroup } from "./UserGroup";
17
+ import { UserMFA } from "./UserMFA";
18
+ import { UserNotifications } from "./UserNotifications";
19
+ import { UserSSO } from "./UserSSO";
20
+ /**
21
+ * A grouping of credentials, information, preferences, and permissions for a person or machine to login to the system and access its resources.
22
+ */
23
+ export declare class User extends BaseCompound implements IEnabled, IBelongCompany, IHavePermissions, IHavePreferences {
24
+ #private;
25
+ /**
26
+ *
27
+ */
28
+ get pieces(): BaseComponent[];
29
+ /**
30
+ * The unique public email address used to access the system.
31
+ * {@link User.login}
32
+ */
33
+ get login(): email;
34
+ /**
35
+ * The company to which this user belongs.
36
+ * {@link Company.id}
37
+ */
38
+ get companyId(): ulong;
39
+ /**
40
+ * The {@link Company} to which this user belongs.
41
+ */
42
+ get company(): Company;
43
+ /**
44
+ *
45
+ */
46
+ get general(): UserGeneral;
47
+ /**
48
+ * Indicates whether system access is disabled.
49
+ */
50
+ get enabled(): boolean;
51
+ set enabled(value: boolean);
52
+ /**
53
+ * Human friendly name for these credentials
54
+ */
55
+ get nickname(): string;
56
+ set nickname(value: string);
57
+ /**
58
+ * Contact information for this user.
59
+ * {@link Contact.id}
60
+ */
61
+ get contactId(): ulong;
62
+ set contactId(value: ulong | nothing);
63
+ /**
64
+ * {@link Contact} information for this user.
65
+ */
66
+ get contact(): Contact;
67
+ set contact(value: Contact | nothing);
68
+ /**
69
+ * The user's local timezone.
70
+ */
71
+ get timezone(): Timezone;
72
+ set timezone(value: Timezone);
73
+ /**
74
+ * Preferred region/language for the UI and notifications.
75
+ * Valid formats use <ISO 639-1><dash><ISO 3166-2> such as "fr-CA" or "en-US".
76
+ */
77
+ get language(): codified;
78
+ set language(value: codified);
79
+ /**
80
+ * The format strings defining the preferred way to display ambiguous values.
81
+ */
82
+ get formats(): Map<codified, datetimetemplate>;
83
+ set formats(value: Map<codified, datetimetemplate>);
84
+ /**
85
+ * Preferred way of displaying ambiguous numbers in the context of measurements.
86
+ */
87
+ get measurements(): Map<codified, SystemsOfUnits>;
88
+ set measurements(value: Map<codified, SystemsOfUnits>);
89
+ /**
90
+ * Additional options which do not fit in with the formats or measurements preferences.
91
+ */
92
+ get options(): Map<codified, string>;
93
+ set options(value: Map<codified, string>);
94
+ /**
95
+ * Definition of how and when to send alerts to the user.
96
+ */
97
+ get notify(): UserNotifications[];
98
+ set notify(value: UserNotifications[]);
99
+ /**
100
+ *
101
+ */
102
+ get advanced(): UserAdvanced;
103
+ /**
104
+ * A list of {@link UserGroup}s to which this user belongs.
105
+ * {@link UserGroup.id}
106
+ */
107
+ get groupIds(): ulong[];
108
+ set groupIds(value: ulong[]);
109
+ /**
110
+ * A list of groups to which this user belongs.
111
+ */
112
+ get groups(): UserGroup[];
113
+ set groups(value: UserGroup[]);
114
+ /**
115
+ * Individual permission rules which override the group rules.
116
+ */
117
+ get permissions(): Permission[];
118
+ set permissions(value: Permission[]);
119
+ /**
120
+ *
121
+ */
122
+ get authentication(): UserAuthentication;
123
+ /**
124
+ * Indicated whether the credentials have expired according to the company's policy.
125
+ */
126
+ get passwordExpired(): boolean;
127
+ set passwordExpired(value: boolean);
128
+ /**
129
+ * Multi-factor authentication details for the user.
130
+ */
131
+ get mfa(): UserMFA[];
132
+ set mfa(value: UserMFA[]);
133
+ /**
134
+ * Single Sign-On details for the user.
135
+ */
136
+ get sso(): UserSSO;
137
+ set sso(value: UserSSO);
138
+ toJSON(): {
139
+ v: number[];
140
+ login: string;
141
+ company: number;
142
+ passwordExpired: boolean;
143
+ mfa: any[];
144
+ sso: {
145
+ enabled: boolean;
146
+ provider: import("./SSOIdentityProvider").SSOIdentityProvider;
147
+ lastAuthentication: string | null;
148
+ externalId: string | null;
149
+ };
150
+ groups: number[];
151
+ permissions: any[];
152
+ nickname: string;
153
+ enabled: boolean;
154
+ contact: boolean;
155
+ timezone: string;
156
+ language: string;
157
+ formats: JsonObject;
158
+ measurements: JsonObject;
159
+ options: JsonObject;
160
+ notify: any[];
161
+ };
162
+ fromJSON(json: JsonObject, force?: boolean): boolean;
163
+ /**
164
+ * The {@link login} is the key.
165
+ */
166
+ getKey(): string;
167
+ }
@@ -0,0 +1,53 @@
1
+ import { BaseComponent } from "../API/BaseComponent";
2
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
+ import { IHavePermissions } from "../API/Interfaces/IHavePermissions";
4
+ import { email, JsonObject, ulong } from "../API/Types";
5
+ import { Company } from "../Companies/Company";
6
+ import { Permission } from "./Permissions/Permission";
7
+ import { UserGroup } from "./UserGroup";
8
+ /**
9
+ * Permissions and group membership defined for a user.
10
+ */
11
+ export declare class UserAdvanced extends BaseComponent implements IBelongCompany, IHavePermissions {
12
+ /**
13
+ * The unique public email address used to access the system.
14
+ * {@link User.login}
15
+ */
16
+ login: email;
17
+ /**
18
+ * The company to which this user belongs.
19
+ * {@link Company.id}
20
+ */
21
+ companyId: ulong;
22
+ /**
23
+ * The {@link Company} to which this user belongs.
24
+ */
25
+ get company(): Company;
26
+ /**
27
+ * A list of groups to which this user belongs.
28
+ * {@link UserGroup.id}
29
+ */
30
+ groupIds: ulong[];
31
+ /**
32
+ * A list of groups to which this user belongs.
33
+ * {@link UserGroup.id}
34
+ */
35
+ get groups(): UserGroup[];
36
+ set groups(value: UserGroup[]);
37
+ /**
38
+ * Individual permission rules which override the group rules.
39
+ */
40
+ permissions: Permission[];
41
+ toJSON(): {
42
+ login: string;
43
+ v: number[];
44
+ company: number;
45
+ groups: number[];
46
+ permissions: any[];
47
+ };
48
+ fromJSON(json: JsonObject, force?: boolean): boolean;
49
+ /**
50
+ * The {@link login} is the key.
51
+ */
52
+ getKey(): string;
53
+ }
@@ -0,0 +1,55 @@
1
+ import { BaseComponent } from "../API/BaseComponent";
2
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
+ import { JsonObject, email, ulong } from "../API/Types";
4
+ import { Company } from "../Companies/Company";
5
+ import { UserMFA } from "./UserMFA";
6
+ import { UserSSO } from "./UserSSO";
7
+ /**
8
+ * Credentials, information, and preferences about a user.
9
+ */
10
+ export declare class UserAuthentication extends BaseComponent implements IBelongCompany {
11
+ /**
12
+ * The unique public email address used to access the system.
13
+ * {@link User.login}
14
+ */
15
+ login: email;
16
+ /**
17
+ * The company to which this user belongs.
18
+ * {@link Company.id}
19
+ */
20
+ companyId: ulong;
21
+ /**
22
+ * The {@link Company} to which this user belongs.
23
+ */
24
+ get company(): Company;
25
+ /**
26
+ * Indicated whether the credentials have expired according to the company's policy.
27
+ */
28
+ passwordExpired: boolean;
29
+ /**
30
+ * Multi-factor authentication details for the user.
31
+ */
32
+ mfa: UserMFA[];
33
+ /**
34
+ * Single Sign-On details for the user.
35
+ */
36
+ sso: UserSSO;
37
+ toJSON(): {
38
+ login: string;
39
+ v: number[];
40
+ company: number;
41
+ passwordExpired: boolean;
42
+ mfa: any[];
43
+ sso: {
44
+ enabled: boolean;
45
+ provider: import("./SSOIdentityProvider").SSOIdentityProvider;
46
+ lastAuthentication: string | null;
47
+ externalId: string | null;
48
+ };
49
+ };
50
+ fromJSON(json: JsonObject, force?: boolean): boolean;
51
+ /**
52
+ * The {@link login} is the key.
53
+ */
54
+ getKey(): string;
55
+ }
@@ -0,0 +1,98 @@
1
+ import { BaseComponent } from "../API/BaseComponent";
2
+ import { IBelongCompany } from "../API/Interfaces/IBelongCompany";
3
+ import { IEnabled } from "../API/Interfaces/IEnabled";
4
+ import { IHavePreferences } from "../API/Interfaces/IHavePreferences";
5
+ import { Timezone } from "../API/Timezone";
6
+ import { JsonObject, codified, datetimetemplate, email, ulong } from "../API/Types";
7
+ import { Company } from "../Companies/Company";
8
+ import { Contact } from "./Contact";
9
+ import { SystemsOfUnits } from "./SystemsOfUnits";
10
+ import { UserNotifications } from "./UserNotifications";
11
+ /**
12
+ * Credentials, information, and preferences about a user.
13
+ */
14
+ export declare class UserGeneral extends BaseComponent implements IEnabled, IBelongCompany, IHavePreferences {
15
+ /**
16
+ * The unique public email address used to access the system.
17
+ * {@link User.login}
18
+ */
19
+ login: email;
20
+ /**
21
+ * The company to which this user belongs.
22
+ * {@link Company.id}
23
+ */
24
+ companyId: ulong;
25
+ /**
26
+ * The {@link Company} to which this user belongs.
27
+ */
28
+ get company(): Company;
29
+ /**
30
+ * Indicated whether the credentials have expired according to the company's policy.
31
+ */
32
+ passwordExpired: boolean;
33
+ /**
34
+ * Indicates whether system access is disabled.
35
+ */
36
+ enabled: boolean;
37
+ /**
38
+ * Human friendly name for these credentials
39
+ */
40
+ nickname: string;
41
+ /**
42
+ * Contact information for this user.
43
+ * {@link Contact.id}
44
+ */
45
+ contactId: ulong;
46
+ /**
47
+ * {@link Contact} information for this user.
48
+ */
49
+ get contact(): Contact;
50
+ set contact(value: Contact);
51
+ /**
52
+ * The user's local timezone.
53
+ * {@link Timezone.code}
54
+ */
55
+ timezone: Timezone;
56
+ /**
57
+ * Preferred region/language for the UI and notifications.
58
+ * Valid formats use &lt;ISO 639-1&gt;&lt;dash&gt;&lt;ISO 3166-2&gt; such as "fr-CA" or "en-US".
59
+ */
60
+ language: codified;
61
+ /**
62
+ * The format strings defining the preferred way to display ambiguous values.
63
+ */
64
+ formats: Map<codified, datetimetemplate>;
65
+ /**
66
+ * Preferred way of displaying ambiguous numbers in the context of measurements.
67
+ */
68
+ measurements: Map<codified, SystemsOfUnits>;
69
+ /**
70
+ * Additional options which do not fit in with the formats or measurements preferences.
71
+
72
+ */
73
+ options: Map<codified, string>;
74
+ /**
75
+ * Definition of how and when to send alerts to the user.
76
+ */
77
+ notify: UserNotifications[];
78
+ toJSON(): {
79
+ login: string;
80
+ v: number[];
81
+ company: number;
82
+ nickname: string;
83
+ enabled: boolean;
84
+ contact: boolean;
85
+ passwordExpired: boolean;
86
+ timezone: string;
87
+ language: string;
88
+ formats: JsonObject;
89
+ measurements: JsonObject;
90
+ options: JsonObject;
91
+ notify: any[];
92
+ };
93
+ fromJSON(json: JsonObject, force?: boolean): boolean;
94
+ /**
95
+ * The {@link login} is the key.
96
+ */
97
+ getKey(): string;
98
+ }
@@ -0,0 +1,51 @@
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 { JsonObject, ulong } from "../API/Types";
6
+ import { Company } from "../Companies/Company";
7
+ import { Permission } from "./Permissions/Permission";
8
+ /**
9
+ * Members of a group (as set by a {@link User}'s {@link UserAdvanced.groups} or {@link Machine}'s {@link Machine.groups})
10
+ * allow for easy administration of permissions and levels of access.
11
+ */
12
+ export declare class UserGroup extends BaseComponent implements IIdUlong, INamed, IBelongCompany {
13
+ /**
14
+ * Unique identifier of this group.
15
+ */
16
+ id: ulong;
17
+ /**
18
+ * The company to which this group belongs.
19
+ * {@link Company.id}
20
+ */
21
+ companyId: ulong;
22
+ /**
23
+ * The {@link Company} to which this group belongs.
24
+ */
25
+ get company(): Company;
26
+ /**
27
+ * A name given to this group.
28
+ */
29
+ name: string;
30
+ /**
31
+ * Notes about this group, and to whom this group should be applied.
32
+ */
33
+ notes: string;
34
+ /**
35
+ * Permissions for this group.
36
+ */
37
+ permissions: Permission[];
38
+ toJSON(): {
39
+ id: number;
40
+ v: number[];
41
+ company: number;
42
+ name: string;
43
+ notes: string;
44
+ permissions: any[];
45
+ };
46
+ fromJSON(json: JsonObject, force?: boolean): boolean;
47
+ /**
48
+ * The {@link id} is the key.
49
+ */
50
+ getKey(): number;
51
+ }
@@ -0,0 +1,47 @@
1
+ import { ISerializable } from '../API/Interfaces/ISerializable';
2
+ import { datetime, JsonObject, nothing } from '../API/Types';
3
+ import { MultiFactorType } from './MultiFactorType';
4
+ /**
5
+ * Multi-factor authentication details for a {@link User}.
6
+ */
7
+ export declare class UserMFA implements ISerializable {
8
+ /**
9
+ *
10
+ * @param json
11
+ * @returns
12
+ */
13
+ static fromJSON(json: JsonObject): UserMFA;
14
+ /**
15
+ * Indicates whether MFA is enabled for the user.
16
+ */
17
+ enabled: boolean;
18
+ /**
19
+ * The type of MFA configured for the user.
20
+ */
21
+ kind: MultiFactorType;
22
+ /**
23
+ * Phone number or email address associated with the MFA method.
24
+ */
25
+ address: string;
26
+ /**
27
+ * Indicates if MFA setup has been completed and verified.
28
+ */
29
+ verified: boolean;
30
+ /**
31
+ * The date when MFA was set up.
32
+ */
33
+ setupDate: Date;
34
+ /**
35
+ * The last time the user authenticated using MFA.
36
+ */
37
+ lastAuthentication: Date;
38
+ constructor(enabled?: boolean | nothing, kind?: MultiFactorType | nothing, address?: string | nothing, verified?: boolean | nothing, setupDate?: Date | datetime | nothing, lastAuthentication?: Date | datetime | nothing);
39
+ toJSON(): {
40
+ enabled: boolean;
41
+ kind: MultiFactorType;
42
+ address: string;
43
+ verified: boolean;
44
+ setupDate: string | null;
45
+ lastAuthentication: string | null;
46
+ };
47
+ }
@@ -0,0 +1,76 @@
1
+ import { IEnabled } from "../API/Interfaces/IEnabled";
2
+ import { ISerializable } from "../API/Interfaces/ISerializable";
3
+ import { TimeSpan } from "../API/TimeSpan";
4
+ import { email, JsonObject, timespan, ulong } from "../API/Types";
5
+ import { NotificationMethod } from "./NotificationMethod";
6
+ /**
7
+ * Definition of how and when to send alerts to the user.
8
+ */
9
+ export declare class UserNotifications implements IEnabled, ISerializable {
10
+ /**
11
+ *
12
+ * @param json
13
+ */
14
+ static fromJSON(json: JsonObject): UserNotifications;
15
+ /**
16
+ * A common name like "Weekdays" or "Off Hours".
17
+ */
18
+ name: string;
19
+ /**
20
+ * A flag for whether or not this schedule is in use.
21
+ */
22
+ enabled: boolean;
23
+ /**
24
+ * A 7 item, boolean array, determines if the user should be notified on that day of the week.
25
+ * The days of the week are defined in local time, not UTC.
26
+ * {@link UserGeneral.timezone}
27
+ */
28
+ weekdays: boolean[];
29
+ /**
30
+ * Start time portion of the schedule that defines a period of the day when the user wants to receive alerts.
31
+ * The time value is defined in local time, not UTC.
32
+ * {@link UserGeneral.timezone}
33
+ */
34
+ start: TimeSpan;
35
+ /**
36
+ * End time portion of the schedule that defines a period of the day when the user wants to receive alerts.
37
+ * The time value is defined in local time, not UTC.
38
+ * {@link UserGeneral.timezone}
39
+ */
40
+ end: TimeSpan;
41
+ /**
42
+ * Email address where the sent is sent.
43
+ * If not specified, the email address from the User's {@link Contact} is taken.
44
+ * If the contact has no email address, the alert is sent to the user's login.
45
+ */
46
+ email: email;
47
+ /**
48
+ * SMS address where the alert is sent.
49
+ * If not specified, the mobile phone number from the User's {@link Contact} is taken.
50
+ * If the contact has no mobile phone number, the alert is not sent.
51
+ */
52
+ sms: ulong;
53
+ /**
54
+ * A list of the types of methods to use to notify the user when they have an active WebSocket connection.
55
+ */
56
+ online: NotificationMethod[];
57
+ /**
58
+ * A list of the types of methods to use to notify the user when they are not connected.
59
+ */
60
+ offline: NotificationMethod[];
61
+ constructor(name?: string, enabled?: boolean, weekdays?: string | boolean[], start?: TimeSpan | timespan | number, end?: TimeSpan | timespan | number, email?: email, sms?: ulong, online?: NotificationMethod[], offline?: NotificationMethod[]);
62
+ /**
63
+ *
64
+ */
65
+ toJSON(): {
66
+ name: string;
67
+ enabled: boolean;
68
+ weekdays: string;
69
+ start: string;
70
+ end: string;
71
+ email: string;
72
+ sms: number | null;
73
+ online: NotificationMethod[];
74
+ offline: NotificationMethod[];
75
+ };
76
+ }