@trakit/objects 0.0.16 → 0.0.17

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/Companies/NotificationServerEmail.d.ts +0 -2
  2. package/README.md +24 -24
  3. package/index.d.ts +1 -1
  4. package/package.json +37 -37
  5. package/trakit-objects.min.js +2 -2
  6. package/objects/API/Arrays.d.ts +0 -46
  7. package/objects/API/Base.d.ts +0 -19
  8. package/objects/API/BaseComponent.d.ts +0 -40
  9. package/objects/API/BaseCompound.d.ts +0 -19
  10. package/objects/API/Codifier.d.ts +0 -15
  11. package/objects/API/Constants.d.ts +0 -39
  12. package/objects/API/Conversion.d.ts +0 -255
  13. package/objects/API/Encoding.d.ts +0 -9
  14. package/objects/API/Files.d.ts +0 -21
  15. package/objects/API/Functions.d.ts +0 -196
  16. package/objects/API/Geography/Functions.d.ts +0 -236
  17. package/objects/API/Geography/Interfaces.d.ts +0 -150
  18. package/objects/API/Geography/LatLng.d.ts +0 -86
  19. package/objects/API/Geography/LatLngBounds.d.ts +0 -146
  20. package/objects/API/Geography/Position.d.ts +0 -74
  21. package/objects/API/Geography/StreetAddress.d.ts +0 -59
  22. package/objects/API/Geometry/Functions.d.ts +0 -114
  23. package/objects/API/Geometry/Interfaces.d.ts +0 -111
  24. package/objects/API/Geometry/Point.d.ts +0 -81
  25. package/objects/API/Geometry/Radial.d.ts +0 -110
  26. package/objects/API/Geometry/Rectangle.d.ts +0 -159
  27. package/objects/API/Geometry/Size.d.ts +0 -58
  28. package/objects/API/Guid.d.ts +0 -4
  29. package/objects/API/Interfaces/IAmCompany.d.ts +0 -11
  30. package/objects/API/Interfaces/IBelongAsset.d.ts +0 -15
  31. package/objects/API/Interfaces/IBelongBillingProfile.d.ts +0 -15
  32. package/objects/API/Interfaces/IBelongCompany.d.ts +0 -15
  33. package/objects/API/Interfaces/IDeserializable.d.ts +0 -13
  34. package/objects/API/Interfaces/IEnabled.d.ts +0 -10
  35. package/objects/API/Interfaces/IFileSize.d.ts +0 -9
  36. package/objects/API/Interfaces/IGlobal.d.ts +0 -11
  37. package/objects/API/Interfaces/IHavePermissions.d.ts +0 -20
  38. package/objects/API/Interfaces/IHavePreferences.d.ts +0 -29
  39. package/objects/API/Interfaces/IIconic.d.ts +0 -15
  40. package/objects/API/Interfaces/IIdUlong.d.ts +0 -10
  41. package/objects/API/Interfaces/ILabelled.d.ts +0 -10
  42. package/objects/API/Interfaces/INamed.d.ts +0 -13
  43. package/objects/API/Interfaces/IPictured.d.ts +0 -15
  44. package/objects/API/Interfaces/IRequestable.d.ts +0 -22
  45. package/objects/API/Interfaces/ISerializable.d.ts +0 -10
  46. package/objects/API/Interfaces/ISuspendable.d.ts +0 -16
  47. package/objects/API/Interfaces/IVisual.d.ts +0 -18
  48. package/objects/API/Maps.d.ts +0 -28
  49. package/objects/API/Objects.d.ts +0 -5
  50. package/objects/API/SearchPattern.d.ts +0 -46
  51. package/objects/API/TimeSpan.d.ts +0 -109
  52. package/objects/API/Timezone.d.ts +0 -44
  53. package/objects/API/Timezones.d.ts +0 -7
  54. package/objects/API/Types.d.ts +0 -132
  55. package/objects/Accounts/Contact.d.ts +0 -139
  56. package/objects/Accounts/Machine.d.ts +0 -139
  57. package/objects/Accounts/MultiFactorType.d.ts +0 -17
  58. package/objects/Accounts/NotificationMethod.d.ts +0 -17
  59. package/objects/Accounts/Permissions/Authorizer.d.ts +0 -204
  60. package/objects/Accounts/Permissions/Permission.d.ts +0 -56
  61. package/objects/Accounts/Permissions/PermissionEscalation.d.ts +0 -41
  62. package/objects/Accounts/Permissions/PermissionEscalationState.d.ts +0 -19
  63. package/objects/Accounts/Permissions/PermissionEscalationType.d.ts +0 -13
  64. package/objects/Accounts/Permissions/PermissionLevel.d.ts +0 -17
  65. package/objects/Accounts/Permissions/PermissionMethod.d.ts +0 -13
  66. package/objects/Accounts/Permissions/PermissionType.d.ts +0 -280
  67. package/objects/Accounts/SSOIdentityProvider.d.ts +0 -25
  68. package/objects/Accounts/Session.d.ts +0 -89
  69. package/objects/Accounts/SessionStatus.d.ts +0 -29
  70. package/objects/Accounts/SystemsOfUnits.d.ts +0 -13
  71. package/objects/Accounts/User.d.ts +0 -167
  72. package/objects/Accounts/UserAdvanced.d.ts +0 -53
  73. package/objects/Accounts/UserAuthentication.d.ts +0 -55
  74. package/objects/Accounts/UserGeneral.d.ts +0 -98
  75. package/objects/Accounts/UserGroup.d.ts +0 -51
  76. package/objects/Accounts/UserMFA.d.ts +0 -47
  77. package/objects/Accounts/UserNotifications.d.ts +0 -76
  78. package/objects/Accounts/UserSSO.d.ts +0 -37
  79. package/objects/Assets/Asset.d.ts +0 -218
  80. package/objects/Assets/AssetAdvanced.d.ts +0 -77
  81. package/objects/Assets/AssetAttribute.d.ts +0 -71
  82. package/objects/Assets/AssetDispatch.d.ts +0 -55
  83. package/objects/Assets/AssetGeneral.d.ts +0 -127
  84. package/objects/Assets/AssetPlaceStatus.d.ts +0 -31
  85. package/objects/Assets/AssetPlaceStatusType.d.ts +0 -17
  86. package/objects/Assets/AssetType.d.ts +0 -21
  87. package/objects/Behaviours/Behaviour.d.ts +0 -78
  88. package/objects/Behaviours/BehaviourLog.d.ts +0 -95
  89. package/objects/Behaviours/BehaviourLogType.d.ts +0 -21
  90. package/objects/Behaviours/BehaviourParameter.d.ts +0 -38
  91. package/objects/Behaviours/BehaviourParameterType.d.ts +0 -21
  92. package/objects/Behaviours/BehaviourScript.d.ts +0 -83
  93. package/objects/Billing/BillableBase.d.ts +0 -83
  94. package/objects/Billing/BillableSmsProfile.d.ts +0 -26
  95. package/objects/Billing/BillingCurrency.d.ts +0 -17
  96. package/objects/Billing/BillingCycle.d.ts +0 -17
  97. package/objects/Billing/BillingProfile.d.ts +0 -104
  98. package/objects/Billing/Hosting/BillableHostingBase.d.ts +0 -41
  99. package/objects/Billing/Hosting/BillableHostingLicense.d.ts +0 -30
  100. package/objects/Billing/Hosting/BillableHostingLicenseType.d.ts +0 -20
  101. package/objects/Billing/Hosting/BillableHostingRule.d.ts +0 -30
  102. package/objects/Billing/Hosting/BillableHostingType.d.ts +0 -41
  103. package/objects/Billing/Report/BillingReport.d.ts +0 -112
  104. package/objects/Billing/Report/BillingReportBreakdown.d.ts +0 -34
  105. package/objects/Billing/Report/BillingReportHostingSummary.d.ts +0 -36
  106. package/objects/Billing/Report/BillingReportLicenseBreakdown.d.ts +0 -79
  107. package/objects/Billing/Report/BillingReportServiceBreakdown.d.ts +0 -124
  108. package/objects/Billing/Report/BillingReportStatus.d.ts +0 -25
  109. package/objects/Billing/Report/BillingReportSummary.d.ts +0 -49
  110. package/objects/Companies/ColourStyle.d.ts +0 -25
  111. package/objects/Companies/Company.d.ts +0 -167
  112. package/objects/Companies/CompanyDirectory.d.ts +0 -52
  113. package/objects/Companies/CompanyGeneral.d.ts +0 -55
  114. package/objects/Companies/CompanyPolicy.d.ts +0 -66
  115. package/objects/Companies/CompanyReseller.d.ts +0 -166
  116. package/objects/Companies/CompanyStyle.d.ts +0 -50
  117. package/objects/Companies/LabelStyle.d.ts +0 -46
  118. package/objects/Companies/NotificationServerEmail.d.ts +0 -99
  119. package/objects/Companies/NotificationServerSms.d.ts +0 -25
  120. package/objects/Companies/PasswordExpiryMode.d.ts +0 -17
  121. package/objects/Companies/PasswordPolicy.d.ts +0 -51
  122. package/objects/Companies/SessionMultiUser.d.ts +0 -17
  123. package/objects/Companies/SessionPolicy.d.ts +0 -47
  124. package/objects/Dispatch/DispatchDirection.d.ts +0 -53
  125. package/objects/Dispatch/DispatchJob.d.ts +0 -107
  126. package/objects/Dispatch/DispatchJobPriority.d.ts +0 -25
  127. package/objects/Dispatch/DispatchStep.d.ts +0 -99
  128. package/objects/Dispatch/DispatchStepState.d.ts +0 -27
  129. package/objects/Dispatch/DispatchStepStatus.d.ts +0 -21
  130. package/objects/Dispatch/DispatchTask.d.ts +0 -154
  131. package/objects/Dispatch/DispatchTaskStatus.d.ts +0 -50
  132. package/objects/Hosting/Document.d.ts +0 -70
  133. package/objects/Hosting/Fields/FormFieldAttachments.d.ts +0 -31
  134. package/objects/Hosting/Fields/FormFieldBase.d.ts +0 -56
  135. package/objects/Hosting/Fields/FormFieldBase_fromJSON.d.ts +0 -1
  136. package/objects/Hosting/Fields/FormFieldBoolean.d.ts +0 -38
  137. package/objects/Hosting/Fields/FormFieldChoice.d.ts +0 -46
  138. package/objects/Hosting/Fields/FormFieldDate.d.ts +0 -26
  139. package/objects/Hosting/Fields/FormFieldNumeric.d.ts +0 -54
  140. package/objects/Hosting/Fields/FormFieldNumericSize.d.ts +0 -32
  141. package/objects/Hosting/Fields/FormFieldSignature.d.ts +0 -17
  142. package/objects/Hosting/Fields/FormFieldText.d.ts +0 -32
  143. package/objects/Hosting/Fields/FormFieldTime.d.ts +0 -37
  144. package/objects/Hosting/Fields/FormFieldTimezone.d.ts +0 -14
  145. package/objects/Hosting/FormFieldType.d.ts +0 -127
  146. package/objects/Hosting/FormResult.d.ts +0 -95
  147. package/objects/Hosting/FormTemplate.d.ts +0 -80
  148. package/objects/Images/Dashcam.d.ts +0 -63
  149. package/objects/Images/DashcamBase.d.ts +0 -97
  150. package/objects/Images/DashcamLive.d.ts +0 -36
  151. package/objects/Images/DashcamMediaType.d.ts +0 -17
  152. package/objects/Images/Icon.d.ts +0 -66
  153. package/objects/Images/IconGlyph.d.ts +0 -47
  154. package/objects/Images/IconLabel.d.ts +0 -29
  155. package/objects/Images/IconLayer.d.ts +0 -33
  156. package/objects/Images/Picture.d.ts +0 -72
  157. package/objects/Maintenance/MaintenanceInterval.d.ts +0 -48
  158. package/objects/Maintenance/MaintenanceJob.d.ts +0 -134
  159. package/objects/Maintenance/MaintenanceJobStatus.d.ts +0 -21
  160. package/objects/Maintenance/MaintenanceSchedule.d.ts +0 -118
  161. package/objects/Messaging/AlertPriority.d.ts +0 -17
  162. package/objects/Messaging/AssetAlert.d.ts +0 -29
  163. package/objects/Messaging/AssetMessage.d.ts +0 -40
  164. package/objects/Messaging/MessageBase.d.ts +0 -99
  165. package/objects/Messaging/MessageFolder.d.ts +0 -13
  166. package/objects/Messaging/MessageStatus.d.ts +0 -29
  167. package/objects/Messaging/MessageType.d.ts +0 -33
  168. package/objects/Places/Place.d.ts +0 -114
  169. package/objects/Places/PlaceType.d.ts +0 -25
  170. package/objects/Providers/Config/ProviderConfig.d.ts +0 -70
  171. package/objects/Providers/Config/ProviderRegistration.d.ts +0 -119
  172. package/objects/Providers/Config/ProviderScript.d.ts +0 -86
  173. package/objects/Providers/Config/ProviderScriptBlock.d.ts +0 -41
  174. package/objects/Providers/Config/ProviderScriptParameter.d.ts +0 -49
  175. package/objects/Providers/Config/ProviderScriptParameterType.d.ts +0 -17
  176. package/objects/Providers/Configuration/ProviderConfiguration.d.ts +0 -66
  177. package/objects/Providers/Configuration/ProviderConfigurationNode.d.ts +0 -66
  178. package/objects/Providers/Configuration/ProviderConfigurationType.d.ts +0 -62
  179. package/objects/Providers/Configuration/ProviderGeofenceBase.d.ts +0 -29
  180. package/objects/Providers/Configuration/ProviderGeofenceBase_fromJSON.d.ts +0 -1
  181. package/objects/Providers/Configuration/ProviderGeofenceCircular.d.ts +0 -28
  182. package/objects/Providers/Configuration/ProviderGeofencePoint.d.ts +0 -12
  183. package/objects/Providers/Configuration/ProviderGeofencePolygon.d.ts +0 -23
  184. package/objects/Providers/Configuration/ProviderGeofenceRectangle.d.ts +0 -28
  185. package/objects/Providers/Provider.d.ts +0 -205
  186. package/objects/Providers/ProviderAdvanced.d.ts +0 -50
  187. package/objects/Providers/ProviderCommand.d.ts +0 -36
  188. package/objects/Providers/ProviderCommandStatus.d.ts +0 -29
  189. package/objects/Providers/ProviderCommandType.d.ts +0 -37
  190. package/objects/Providers/ProviderControl.d.ts +0 -41
  191. package/objects/Providers/ProviderData.d.ts +0 -30
  192. package/objects/Providers/ProviderGeneral.d.ts +0 -121
  193. package/objects/Providers/ProviderType.d.ts +0 -106
  194. package/objects/Reports/ReportBreakdown.d.ts +0 -49
  195. package/objects/Reports/ReportBreakdownJob.d.ts +0 -37
  196. package/objects/Reports/ReportBreakdownMessage.d.ts +0 -40
  197. package/objects/Reports/ReportBreakdownTask.d.ts +0 -46
  198. package/objects/Reports/ReportBreakdown_fromJSON.d.ts +0 -1
  199. package/objects/Reports/ReportFilterMode.d.ts +0 -17
  200. package/objects/Reports/ReportNotifications.d.ts +0 -31
  201. package/objects/Reports/ReportOptions.d.ts +0 -52
  202. package/objects/Reports/ReportParameter.d.ts +0 -26
  203. package/objects/Reports/ReportParameterType.d.ts +0 -59
  204. package/objects/Reports/ReportRecurrence.d.ts +0 -54
  205. package/objects/Reports/ReportRecurrenceType.d.ts +0 -34
  206. package/objects/Reports/ReportResult.d.ts +0 -169
  207. package/objects/Reports/ReportResultData.d.ts +0 -17
  208. package/objects/Reports/ReportSchedule.d.ts +0 -111
  209. package/objects/Reports/ReportScorecard.d.ts +0 -38
  210. package/objects/Reports/ReportScorecardParameter.d.ts +0 -31
  211. package/objects/Reports/ReportScorecardRules.d.ts +0 -26
  212. package/objects/Reports/ReportStatus.d.ts +0 -29
  213. package/objects/Reports/ReportSummary.d.ts +0 -90
  214. package/objects/Reports/ReportSummaryReason.d.ts +0 -27
  215. package/objects/Reports/ReportTemplate.d.ts +0 -81
  216. package/objects/Reports/ReportTotal.d.ts +0 -47
  217. package/objects/Reports/ReportType.d.ts +0 -42
  218. package/objects/index.d.ts +0 -406
  219. package/objects/storage.d.ts +0 -176
@@ -1,132 +0,0 @@
1
- /**
2
- * Represents the absence of a value.
3
- */
4
- export type nothing = undefined | null;
5
- /**
6
- * 8bit integer
7
- * @example minimum value (-128) to maximum value (127)
8
- */
9
- export type sbyte = number;
10
- /**
11
- * 16bit integer
12
- * @example minimum value (-32768) to maximum value (32767)
13
- */
14
- export type short = number;
15
- /**
16
- * 32bit integer
17
- * @example minimum value (-2147483648) to maximum value (2147483647)
18
- */
19
- export type int = number;
20
- /**
21
- * 64bit integer
22
- * @example minimum value (-9223372036854775808) to maximum value (9223372036854775807)
23
- */
24
- export type long = number;
25
- /**
26
- * 8bit unsigned integer
27
- * @example minimum value (0) to maximum value (255)
28
- */
29
- export type byte = number;
30
- /**
31
- * 16bit unsigned integer
32
- * @example minimum value (0) to maximum value (65535)
33
- */
34
- export type ushort = number;
35
- /**
36
- * 32bit unsigned integer
37
- * @example minimum value (0) to maximum value (4294967295)
38
- */
39
- export type uint = number;
40
- /**
41
- * 64bit unsigned integer
42
- * @example minimum value (0) to maximum value (18446744073709551615)
43
- */
44
- export type ulong = number;
45
- /**
46
- * Single-precision floating point number
47
- * @example minimum value (-3.40282347E+38F) to maximum value (3.40282347E+38F)
48
- */
49
- export type single = number;
50
- /**
51
- * Double-precision floating point number
52
- * @example minimum value (-1.7976931348623157e+308) to maximum value (1.7976931348623157e+308)
53
- */
54
- export type double = number;
55
- /**
56
- * A phone number for a phone in Canada or the United States of America. All phone numbers start with a 1 and are eleven digits long.
57
- * @example "[1]AAALLLSSSS"
58
- */
59
- export type phone = number;
60
- /**
61
- * A lower-case string with all the apostrophes and quotation marks [`"`, `'`, ```, `“`, and `”`] removed, and all non-alphanumeric character sequences replaced with a single minus sign. Diacritics such as `®`, `é`, and `ç` are also replaced with their alhpabetic equivalents (`r`, `e`, and `c`).
62
- */
63
- export type codified = string;
64
- /**
65
- * A string that contains only a valid CSS colour.
66
- * More: {@link https://developer.mozilla.org/en-US/docs/Web/CSS/color_value}
67
- */
68
- export type colour = string;
69
- /**
70
- * A serialized-string representation of a date and time in ISO-8601 format. Square brackets `[]` are used to show optional format information. All other non-alphabetic characters are required.
71
- * @example "yyyy-MM-ddTHH:mm:ss[.fff]Z"
72
- */
73
- export type datetime = string;
74
- /**
75
- * These formats define the text representation of dates and times.
76
- */
77
- export type datetimetemplate = string;
78
- /**
79
- * An email address identifies a mailbox to which messages are delivered. We follow the `RFC 2822` pattern for addresses.
80
- * More: {@link https://tools.ietf.org/html/rfc2822}
81
- * @example "user@domain.tld"
82
- */
83
- export type email = string;
84
- /**
85
- * A targeting pattern is a string that represents an in-the-moment search for objects. The operators used depend entirely on the context of the search, and compatibility with the sub-system.
86
- * More: {@link https://fleetfreedom.freshdesk.com/en/support/solutions/articles/3000061325-advanced-search-options}
87
- * @example "operator:terms terms"
88
- */
89
- export type expression = string;
90
- /**
91
- * Globally/Universally Unique Identifier. It is a 36 character long string made up of letters, numbers, and dashes. The letters can be transmitted as upper-case, lower-case, or a combination.
92
- * More: {@link https://docs.microsoft.com/en-us/dotnet/api/system.guid?view=net-5.0}
93
- * @example "xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx"
94
- */
95
- export type guid = string;
96
- /**
97
- * A serialized-string representation of an IPv4 Address. Square brackets `[]` are used to show optional format information. All other non-alphabetic characters are required.
98
- * @example "n.n.n.n[/r]"
99
- */
100
- export type ipv4 = string;
101
- /**
102
- * The algorithm is a lossy compression that stores a series of coordinates as a single string. All coordinates are rounded to six decimal places before encoding, but this should be accurate to within roughly one and a half meters.
103
- * More: {@link https://developers.google.com/maps/documentation/utilities/polylinealgorithm}
104
- */
105
- export type polyline = string;
106
- /**
107
- * A serialized-string representation of a duration of time. There are two possible formats when using a duration string. Square brackets `[]` are used to show optional format information. All other non-alphabetic characters are required.
108
- * @example "[-][d.]H:mm[:ss[.fff]]"
109
- * @example "[-]d"
110
- */
111
- export type timespan = string;
112
- /**
113
- * Most commonly a website address, but can also be any other type of locator like `ssh:`. We follow the `RFC 1738` pattern for addresses.
114
- * More: {@link https://tools.ietf.org/html/rfc1738}
115
- * @example "http[s]://domain.tld/path?query#fragment"
116
- * @example "protocol:path?query"
117
- */
118
- export type url = string;
119
- /**
120
- * A JSON object is an unordered collection of key/value pairs.
121
- */
122
- export type JsonObject = {
123
- [key: string]: JsonValue;
124
- };
125
- /**
126
- * An array of any valid JSON value.
127
- */
128
- export type JsonArray = JsonValue[];
129
- /**
130
- * Any valid JSON value.
131
- */
132
- export type JsonValue = null | boolean | number | string | JsonArray | JsonObject;
@@ -1,139 +0,0 @@
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 { IPictured } from "../API/Interfaces/IPictured";
6
- import { codified, email, JsonObject, phone, ulong, url } from "../API/Types";
7
- import { Company } from "../Companies/Company";
8
- import { Picture } from "../Images/Picture";
9
- /**
10
- * Contact information.
11
- */
12
- export declare class Contact extends BaseComponent implements IIdUlong, INamed, IBelongCompany, IPictured {
13
- /**
14
- * Unique identifier of this contact.
15
- */
16
- id: ulong;
17
- /**
18
- * The company to which this contact belongs
19
- * {@link Company.id}
20
- */
21
- companyId: ulong;
22
- /**
23
- * The {@link Company} to which this contact belongs
24
- */
25
- get company(): Company;
26
- /**
27
- * The person's name
28
- */
29
- name: string;
30
- /**
31
- * Notes about this person.
32
- */
33
- notes: string;
34
- /**
35
- * A collection of other names this person might go by.
36
- * Use the object key like a name identifier.
37
- * Example keys: Initials, Nickname, Maiden Name, etc.
38
- */
39
- otherNames: Map<string, string>;
40
- /**
41
- * Email addresses.
42
- * Use the object key like a name of the address.
43
- * Example keys: Home, Work, Support, Old, etc.
44
- */
45
- emails: Map<string, email>;
46
- /**
47
- * Phone numbers.
48
- * Use the object key like a name of the phone number.
49
- * Example keys: Mobile, Fax, Home, Office, etc.
50
- */
51
- phones: Map<string, phone>;
52
- /**
53
- * Mailing addresses.
54
- * Use the object key like a name of the address.
55
- * Example keys: Home, Work, Park, etc.
56
- */
57
- addresses: Map<string, string>;
58
- /**
59
- * Websites and other online resources.
60
- * Use the object key like a name of the address.
61
- * Example keys: Downloads, Support, FTP, etc.
62
- */
63
- urls: Map<string, url>;
64
- /**
65
- * Date information.
66
- * Use the object key like a name of the date.
67
- * Example keys: Birthday, Started Date, Retired On, etc.
68
- */
69
- dates: Map<string, Date>;
70
- /**
71
- * Uncategorized information.
72
- * Use the object keys and values however you'd like.
73
- */
74
- options: Map<string, string>;
75
- /**
76
- * A list of roles they play in the Company.
77
- */
78
- roles: codified[];
79
- /**
80
- * {@link Picture.id}s of this {@link Contact}.
81
- */
82
- pictureIds: ulong[];
83
- /**
84
- * {@link Picture}s of this {@link Contact}.
85
- */
86
- get pictures(): Picture[];
87
- set pictures(values: Picture[]);
88
- /**
89
- * Primary email address.
90
- */
91
- get email(): email;
92
- set email(value: email);
93
- /**
94
- * A cellular phone number.
95
- */
96
- get mobile(): phone;
97
- set mobile(value: phone);
98
- /**
99
- * A workplace landline phone number.
100
- */
101
- get office(): phone;
102
- set office(value: phone);
103
- /**
104
- * Why can't we get rid of these damn machines?
105
- */
106
- get fax(): phone;
107
- set fax(value: phone);
108
- /**
109
- * Primary email address.
110
- */
111
- get address(): string;
112
- set address(value: string);
113
- /**
114
- * Website.
115
- */
116
- get url(): url;
117
- set url(value: url);
118
- toJSON(): {
119
- id: number | null;
120
- v: number[];
121
- company: number;
122
- name: string;
123
- notes: string;
124
- otherNames: JsonObject;
125
- emails: JsonObject;
126
- phones: JsonObject;
127
- addresses: JsonObject;
128
- urls: JsonObject;
129
- dates: JsonObject;
130
- options: JsonObject;
131
- roles: string[];
132
- pictures: number[];
133
- };
134
- fromJSON(json: JsonObject, force?: boolean): boolean;
135
- /**
136
- * The {@link id} is the key.
137
- */
138
- getKey(): number;
139
- }
@@ -1,139 +0,0 @@
1
- import { BaseComponent } from '../API/BaseComponent';
2
- import { IBelongCompany } from '../API/Interfaces/IBelongCompany';
3
- import { IEnabled } from '../API/Interfaces/IEnabled';
4
- import { IHavePermissions } from '../API/Interfaces/IHavePermissions';
5
- import { IHavePreferences } from '../API/Interfaces/IHavePreferences';
6
- import { Timezone } from '../API/Timezone';
7
- import { codified, ipv4, JsonObject, ulong, url } from '../API/Types';
8
- import { Company } from '../Companies/Company';
9
- import { Permission } from './Permissions/Permission';
10
- import { SystemsOfUnits } from './SystemsOfUnits';
11
- import { UserGroup } from './UserGroup';
12
- /**
13
- * A service account that allowes for API access of system services.
14
- */
15
- export declare class Machine extends BaseComponent implements IEnabled, IBelongCompany, IHavePreferences, IHavePermissions {
16
- /**
17
- * The unique idenifier used to access the system.
18
- */
19
- key: string;
20
- /**
21
- * The company to which this user belongs.
22
- */
23
- companyId: ulong;
24
- /**
25
- *
26
- */
27
- get company(): Company;
28
- /**
29
- * Indicates whether system access is disable.
30
- */
31
- enabled: boolean;
32
- /**
33
- * A token used to encode or validate requests.
34
- */
35
- secret: string;
36
- /**
37
- * Human friendly name for these credentials
38
- */
39
- nickname: string;
40
- /**
41
- * Notes about this machine.
42
- */
43
- notes: string;
44
- /**
45
- * An optional timestamp that restricts this machine account from being used before the given date.
46
- */
47
- notBefore: Date;
48
- /**
49
- * An optional timestamp that restricts this machine account from being used after the given date.
50
- */
51
- notAfter: Date;
52
- /**
53
- * The service account's local timezone.
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: string;
61
- /**
62
- * The format strings defining the preferred way to display ambiguous values.
63
- */
64
- formats: Map<codified, string>;
65
- /**
66
- * Preferred way of displaying ambiguous numbers in the context of measurements.
67
- */
68
- measurements: Map<string, SystemsOfUnits>;
69
- /**
70
- * Additional options which do not fit in with the formats or measurements preferences.
71
- */
72
- options: Map<string, string>;
73
- /**
74
- * A list of groups to which this machine account belongs.
75
- */
76
- groupIds: ulong[];
77
- /**
78
- * A list of groups to which this machine account belongs.
79
- */
80
- get groups(): UserGroup[];
81
- set groups(value: UserGroup[]);
82
- /**
83
- * Permission rules which override the group rules.
84
- */
85
- permissions: Permission[];
86
- /**
87
- * List of system service URIs that this machine account is permitted to access.
88
- */
89
- services: url[];
90
- /**
91
- * Optional list of your managed domains from which this machine account can be used.
92
- */
93
- referrers: url[];
94
- /**
95
- * Restrict service access to only the provided IP ranges.
96
- * Currently we only support IPv4 ranges using CIDR slash-notation.
97
- */
98
- ipRanges: ipv4[];
99
- /**
100
- * Restrict service access to only the provided IP ranges.
101
- * Currently we only support IPv4 ranges
102
- * When true, no access restrictions ({@link secret}, {@link referrers}, or {@link ipRanges}) are enforced.
103
- */
104
- insecure: boolean;
105
- toJSON(): {
106
- key: string;
107
- v: number[];
108
- company: number;
109
- nickname: string;
110
- notes: string;
111
- enabled: boolean;
112
- notBefore: string | null;
113
- notAfter: string | null;
114
- timezone: string;
115
- language: string;
116
- formats: JsonObject;
117
- measurements: JsonObject;
118
- options: JsonObject;
119
- groups: number[];
120
- permissions: any[];
121
- services: string[];
122
- referrers: string[];
123
- ipRanges: string[];
124
- insecure: boolean;
125
- };
126
- fromJSON(json: JsonObject, force?: boolean): boolean;
127
- /**
128
- * The {@link key} is the key (how about that).
129
- */
130
- getKey(): string;
131
- /**
132
- * Creates an HMAC256 signed input for use in requests.
133
- * @param absoluteUri URL of the request.
134
- * @param method HTTP verb of the request.
135
- * @param contentLength Content length of the request.
136
- * @param date Timestamp for when the request is created.
137
- */
138
- createHmacSignature(absoluteUri: URL | string, method?: string, contentLength?: number, date?: Date): Promise<string>;
139
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Types of multi-factor authentication implementations for a {@link Company}.
3
- */
4
- export declare enum MultiFactorType {
5
- /**
6
- * Use a mobile authenticator app from Apple, Google, Microsoft, or others.
7
- */
8
- app = "app",
9
- /**
10
- * Receive an SMS message with a PIN code to continue logging-in.
11
- */
12
- sms = "sms",
13
- /**
14
- * Receive an email with a PIN code to continue logging-in.
15
- */
16
- email = "email"
17
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * The types of alerts used.
3
- */
4
- export declare enum NotificationMethod {
5
- /**
6
- * A separate message sent across the WebSocket.
7
- */
8
- popup = "popup",
9
- /**
10
- * A text message (SMS).
11
- */
12
- sms = "sms",
13
- /**
14
- * Carrier pigeon.
15
- */
16
- email = "email"
17
- }
@@ -1,204 +0,0 @@
1
- import { codified, ulong } from '../../API/Types';
2
- import { Permission } from './Permission';
3
- import { PermissionEscalation } from './PermissionEscalation';
4
- import { PermissionLevel } from './PermissionLevel';
5
- import { PermissionType } from './PermissionType';
6
- /**
7
- * Users have implied read access to their company's general, labels, policies, icons, and pictures.
8
- */
9
- export declare const IMPLIED_PERMS: PermissionType[];
10
- /**
11
- * These are the permissions which require label-based calculations.
12
- */
13
- export declare const LABEL_BASED_PERMS: PermissionType[];
14
- /**
15
- * Creates a {@link Dictionary} where the key is a {@link Company#id} and the values are well ordered arrays of {@link Permission}s which can be used to further calculate a user's permissions.
16
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
17
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
18
- * @param fromUser The User's user-specific permissions.
19
- * @param skipImpliedPermissions When true, does not automatically add implied permissions for the user's company.
20
- */
21
- export declare function computeAll(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[], skipImpliedPermissions?: boolean): Map<number, Permission[]>;
22
- /**
23
- * Creates a well ordered array of {@link Permission}s which can be used to further calculate a user's permissions for the target company.
24
- * @param userCompanyId Unique identifier of the {@link Company#id} to which the User belongs.
25
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
26
- * @param fromUser The User's user-specific permissions.
27
- * @param targetCompanyId Unique identifier of the {@link Company#id} being tested for access.
28
- * @param skipImpliedPermissions When true, does not automatically add implied permissions for the user's company.
29
- */
30
- export declare function compute(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[], targetCompanyId?: ulong, skipImpliedPermissions?: boolean): Permission[];
31
- /**
32
- * Creates a {@link Dictionary} where the key is a {@link Company#id} and the values are well ordered arrays of simple {@link Permission}s which can be used to further calculate a user's permissions.
33
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
34
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
35
- * @param fromUser The User's user-specific permissions.
36
- */
37
- export declare function computeAllSimple(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[]): Map<number, Permission[]>;
38
- /**
39
- * Creates a well ordered array of simple {@link Permission}s which can be used to further calculate a user's permissions.
40
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
41
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
42
- * @param fromUser The User's user-specific permissions.
43
- * @param targetCompanyId Unique identifier of the {@link Company} being tested for access.
44
- */
45
- export declare function computeSimple(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[], targetCompanyId: ulong): Permission[];
46
- /**
47
- * Creates a {@link Dictionary} where the key is a {@link PermissionType} and the values are {@link PermissionLevel}s.
48
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
49
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
50
- * @param fromUser The User's user-specific permissions.
51
- * @param targetCompanyId Unique identifier of the {@link Company} being tested for access.
52
- */
53
- export declare function computeSimpleLevels(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[], targetCompanyId: ulong): Map<PermissionType, PermissionLevel>;
54
- /**
55
- * Gets the permission level of the given simple permission type.
56
- * If the permission type specified is not found, undefined is returned instead.
57
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
58
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
59
- * @param fromUser The User's user-specific permissions.
60
- * @param targetCompanyId Unique identifier of the {@link Company} being tested for access.
61
- * @param targetType The specific {@link PermissionType}s to check.
62
- */
63
- export declare function getSimpleLevel(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[], targetCompanyId: ulong, targetType: PermissionType): PermissionLevel | undefined;
64
- /**
65
- * Checks a specific simple permission type and level, and returns true if access is granted.
66
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
67
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
68
- * @param fromUser The User's user-specific permissions.
69
- * @param targetCompanyId Unique identifier of the {@link Company} being tested for access.
70
- * @param targetType The specific {@link PermissionType}s to check.
71
- * @param targetLevel Minimum requested level of access.
72
- */
73
- export declare function hasSimple(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[], targetCompanyId: ulong, targetType: PermissionType, targetLevel: PermissionLevel): boolean;
74
- /**
75
- * Checks a specific simple permission type and level from a pre-computed array of permissions, and returns true if access is granted.
76
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
77
- * @param permissions Pre-computed and ordered array of {@link Permission} like the kind returned by {@link authorizer.computeSimple}.
78
- * @param targetType The specific {@link PermissionType}s to check.
79
- * @param targetLevel Minimum requested level of access.
80
- */
81
- export declare function findSimple(userCompanyId: ulong, permissions: Permission[], targetType: PermissionType, targetLevel: PermissionLevel): boolean;
82
- /**
83
- * Retrieves the specified simple permission level from a pre-computed array of permissions.
84
- * If the permission type specified is not found, undefined is returned instead.
85
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
86
- * @param permissions Pre-computed and ordered array of {@link Permission} like the kind returned by {@link authorizer.computeSimple}.
87
- * @param targetType The specific {@link PermissionType}s to check.
88
- */
89
- export declare function findSimpleLevel(userCompanyId: ulong, permissions: Permission[], targetType: PermissionType): PermissionLevel | undefined;
90
- /**
91
- * Creates a {@link Dictionary} where the key is a {@link Company#id} and the values are well ordered arrays of complex {@link Permission}s which can be used to further calculate a user's permissions.
92
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
93
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
94
- * @param fromUser The User's user-specific permissions.
95
- */
96
- export declare function computeAllComplex(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[]): Map<number, Permission[]>;
97
- /**
98
- * Creates a well ordered array of complex {@link Permission}s which can be used to further calculate a user's permissions.
99
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
100
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
101
- * @param fromUser The User's user-specific permissions.
102
- * @param targetCompanyId Unique identifier of the {@link Company} being tested for access.
103
- */
104
- export declare function computeComplex(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[], targetCompanyId?: ulong): Permission[];
105
- /**
106
- * Gets the permission level of the given complex permission type.
107
- * If the permission type specified is not found, undefined is returned instead.
108
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
109
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
110
- * @param fromUser The User's user-specific permissions.
111
- * @param targetCompanyId Unique identifier of the {@link Company} being tested for access.
112
- * @param targetCompanyLabels List of codified {@link LabelStyle} names available in the Company.
113
- * @param targetType The specific {@link PermissionType}s to check.
114
- * @param targetLabels List of codified {@link LabelStyle} names used by the target.
115
- */
116
- export declare function getComplexLevel(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[], targetCompanyId: ulong, targetCompanyLabels: codified[], targetType: PermissionType, targetLabels: codified[]): PermissionLevel | undefined;
117
- /**
118
- * Checks a specific complex permission type, level, and labels, and returns true if access is granted.
119
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
120
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
121
- * @param fromUser The User's user-specific permissions.
122
- * @param targetCompanyId Unique identifier of the {@link Company} being tested for access.
123
- * @param targetCompanyLabels List of codified {@link LabelStyle} names available in the Company.
124
- * @param targetType The specific {@link PermissionType}s to check.
125
- * @param targetLabels List of codified {@link LabelStyle} names used by the target.
126
- * @param targetLevel Minimum requested level of access.
127
- */
128
- export declare function hasComplex(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[], targetCompanyId: ulong, targetCompanyLabels: codified[], targetType: PermissionType, targetLabels: codified[], targetLevel: PermissionLevel): boolean;
129
- /**
130
- * Checks a specific complex permission type, level, and labels from a pre-computed array of permissions, and returns true if access is granted.
131
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
132
- * @param permissions Pre-computed and ordered array of {@link Permission} like the kind returned by {@link authorizer.computeComplex}.
133
- * @param targetCompanyLabels List of codified {@link LabelStyle} names available in the Company
134
- * @param targetType The specific {@link PermissionType}s to check.
135
- * @param targetLabels List of codified {@link LabelStyle} names used by the target.
136
- * @param targetLevel Minimum requested level of access.
137
- */
138
- export declare function findComplex(userCompanyId: ulong, permissions: Permission[], targetCompanyLabels: codified[], targetType: PermissionType, targetLabels: codified[], targetLevel: PermissionLevel): boolean;
139
- /**
140
- * Retrieves the specified complex permission level from a pre-computed array of permissions.
141
- * If the permission type specified is not found, undefined is returned instead.
142
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
143
- * @param permissions Pre-computed and ordered array of {@link Permission} like the kind returned by {@link authorizer.computeComplex}.
144
- * @param targetCompanyLabels List of codified {@link LabelStyle} names available in the Company
145
- * @param targetType The specific {@link PermissionType}s to check.
146
- * @param targetLabels List of codified {@link LabelStyle} names used by the target.
147
- */
148
- export declare function findComplexLevel(userCompanyId: ulong, permissions: Permission[], targetCompanyLabels: codified[], targetType: PermissionType, targetLabels: codified[]): PermissionLevel | undefined;
149
- /**
150
- * Checks a specific complex permission type, level, but not the labels, and returns true if access is granted.
151
- * This method can be used as a short-circuit to diving deeper into check label specific permissions.
152
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
153
- * @param fromGroups Collection of permissions from {@link UserGroup}s to which the User belongs.
154
- * @param fromUser The User's user-specific permissions.
155
- * @param targetCompanyId Unique identifier of the {@link Company} being tested for access.
156
- * @param targetType The specific {@link PermissionType}s to check.
157
- * @param targetLevel Optional level of access. If not specified, default is {@link PermissionLevel.read}.
158
- */
159
- export declare function hasAnyComplex(userCompanyId: ulong, fromGroups: Permission[], fromUser: Permission[], targetCompanyId: ulong, targetType: PermissionType, targetLevel: PermissionLevel): boolean;
160
- /**
161
- * Checks a specific complex permission type, level, but not the labels, and returns true if access is granted.
162
- * This method can be used as a short-circuit to diving deeper into check label specific permissions.
163
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
164
- * @param permissions Pre-computed and ordered array of {@link Permission} like the kind returned by {@link authorizer.computeComplex}.
165
- * @param targetType The specific {@link PermissionType}s to check.
166
- * @param targetLevel Optional level of access. If not specified, default is {@link PermissionLevel.read}.
167
- */
168
- export declare function findAnyComplex(userCompanyId: ulong, permissions: Permission[], targetType: PermissionType, targetLevel: PermissionLevel): boolean;
169
- /**
170
- * Generates a {@link Dictionary} (company identifier as the key) of permissions being escalated between two computed permission states.
171
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
172
- * @param before Initial state of fully computed list of permissions (like returned by returned by {@link authorizer.computeAll}).
173
- * @param after Proposed state of computed permissions (like returned by {@link authorizer.computeAll}).
174
- * @param targetCompaniesLabels {@link Dictionary} of company and list of codified {@link LabelStyle} names available. If not specified, complex permissions will not be evaluated correctly.
175
- */
176
- export declare function findAllEscalations(userCompanyId: ulong, before: Map<ulong, Permission[]>, after: Map<ulong, Permission[]>, targetCompaniesLabels: Map<ulong, codified[]>): Map<number, PermissionEscalation[]>;
177
- /**
178
- * Generates an array of permissions being escalated between two computed permission states for a target company.
179
- * @param userCompanyId Unique identifier of the {@link Company} to which the User belongs.
180
- * @param before Initial list of computed permissions for a company (like returned by {@link authorizer.compute}).
181
- * @param after Proposed list of computed permissions for a company (like returned by {@link authorizer.compute}).
182
- * @param targetCompanyLabels List of codified {@link LabelStyle} names available in the Company. If not specified, complex permissions will not be evaluated correctly.
183
- */
184
- export declare function findEscalations(userCompanyId: ulong, before: Permission[], after: Permission[], targetCompanyLabels: codified[]): PermissionEscalation[];
185
- /**
186
- * Generates a list of labels that create an escalated permission state after the proposed modification.
187
- * @param userCompanyId Unique identifier of the Company to which the User belongs.
188
- * @param targetCompanyPermissions List of computed permissions for a company (like returned by {@link authorizer.compute}).
189
- * @param targetTypes List of {@link PermissionType}s to check.
190
- * @param targetCompanyLabels List of codified {@link LabelStyle} names available in the {@link Company}.
191
- * @param targetBeforeLabels The labels appled to the ILabelled object before the proposed change.
192
- * @param targetAfterLabels The labels appled to the ILabelled object after the proposed change.
193
- */
194
- export declare function findAllLabelEscalations(userCompanyId: ulong, targetCompanyPermissions: Permission[], targetTypes: PermissionType[], targetCompanyLabels: codified[], targetBeforeLabels: codified[], targetAfterLabels: codified[]): PermissionEscalation[];
195
- /**
196
- * Generates a list of labels that create an escalated permission state after the proposed modification to an labelled object.
197
- * @param userCompanyId Unique identifier of the Company to which the User belongs.
198
- * @param targetCompanyPermissions List of computed permissions for a single company (like returned by {@link authorizer.compute}).
199
- * @param targetType The specific {@link PermissionType} to check.
200
- * @param targetCompanyLabels List of codified {@link LabelStyle} names available in the {@link Company}.
201
- * @param targetBeforeLabels The labels appled to the ILabelled object before the proposed change.
202
- * @param targetAfterLabels The labels appled to the ILabelled object after the proposed change.
203
- */
204
- export declare function findLabelEscalation(userCompanyId: ulong, targetCompanyPermissions: Permission[], targetType: PermissionType, targetCompanyLabels: codified[], targetBeforeLabels?: codified[], targetAfterLabels?: codified[]): PermissionEscalation | null;