geo-engine-node 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -123,6 +123,393 @@ var TimeoutError = class extends GeoEngineError {
123
123
  this.name = "TimeoutError";
124
124
  }
125
125
  };
126
+ var UserIDRequiredError = class extends ValidationError {
127
+ constructor(message = "geoengine: user_id is required") {
128
+ super(message);
129
+ this.name = "UserIDRequiredError";
130
+ }
131
+ };
132
+ var RuleIDRequiredError = class extends ValidationError {
133
+ constructor(message = "geoengine: rule_id is required") {
134
+ super(message);
135
+ this.name = "RuleIDRequiredError";
136
+ }
137
+ };
138
+ var RuleNameRequiredError = class extends ValidationError {
139
+ constructor(message = "geoengine: rule name is required") {
140
+ super(message);
141
+ this.name = "RuleNameRequiredError";
142
+ }
143
+ };
144
+ var EmailRequiredError = class extends ValidationError {
145
+ constructor(message = "geoengine: email is required") {
146
+ super(message);
147
+ this.name = "EmailRequiredError";
148
+ }
149
+ };
150
+ var RoleRequiredError = class extends ValidationError {
151
+ constructor(message = "geoengine: role is required") {
152
+ super(message);
153
+ this.name = "RoleRequiredError";
154
+ }
155
+ };
156
+ var APIServiceError = class extends APIError {
157
+ /** Machine-readable reason, e.g. "USER_NOT_FOUND". Empty when the API sent none. */
158
+ code;
159
+ /** Message returned by the API, without the SDK prefix. */
160
+ apiMessage;
161
+ details;
162
+ constructor(statusCode, code, message, details = []) {
163
+ super(statusCode, message);
164
+ this.message = code ? `geoengine: api-service error (status ${statusCode}, code ${code}): ${message}` : `geoengine: api-service error (status ${statusCode}): ${message}`;
165
+ this.name = "APIServiceError";
166
+ this.code = code;
167
+ this.apiMessage = message;
168
+ this.details = details;
169
+ }
170
+ };
171
+ var UserNotFoundError = class extends APIServiceError {
172
+ constructor(message = "user not found in organization", statusCode = 404, code = "USER_NOT_FOUND", details = []) {
173
+ super(statusCode, code, message, details);
174
+ this.name = "UserNotFoundError";
175
+ }
176
+ };
177
+ var RuleNotFoundError = class extends APIServiceError {
178
+ constructor(message = "geoidentity rule not found", statusCode = 404, code = "RULE_NOT_FOUND", details = []) {
179
+ super(statusCode, code, message, details);
180
+ this.name = "RuleNotFoundError";
181
+ }
182
+ };
183
+ var UserAlreadyExistsError = class extends APIServiceError {
184
+ constructor(message = "user already belongs to the organization", statusCode = 409, code = "USER_ALREADY_EXISTS", details = []) {
185
+ super(statusCode, code, message, details);
186
+ this.name = "UserAlreadyExistsError";
187
+ }
188
+ };
189
+ var InvitationPendingError = class extends APIServiceError {
190
+ constructor(message = "a pending invitation already exists for this email", statusCode = 409, code = "INVITATION_PENDING", details = []) {
191
+ super(statusCode, code, message, details);
192
+ this.name = "InvitationPendingError";
193
+ }
194
+ };
195
+ var LastAdminError = class extends APIServiceError {
196
+ constructor(message = "organization must keep at least one admin", statusCode = 409, code = "LAST_ADMIN", details = []) {
197
+ super(statusCode, code, message, details);
198
+ this.name = "LastAdminError";
199
+ }
200
+ };
201
+ var LastSubjectError = class extends APIServiceError {
202
+ constructor(message = "rule must keep at least one assigned subject", statusCode = 409, code = "LAST_SUBJECT", details = []) {
203
+ super(statusCode, code, message, details);
204
+ this.name = "LastSubjectError";
205
+ }
206
+ };
207
+
208
+ // src/users.ts
209
+ var Roles = {
210
+ Admin: "roles/geoengine.admin",
211
+ Dispatcher: "roles/geoengine.dispatcher",
212
+ Billing: "roles/geoengine.billing",
213
+ Viewer: "roles/geoengine.viewer",
214
+ Device: "roles/geoengine.device"
215
+ };
216
+ var UserStatus = {
217
+ Active: "active",
218
+ Pending: "pending",
219
+ Revoked: "revoked"
220
+ };
221
+ function toUser(raw) {
222
+ return {
223
+ id: raw.id,
224
+ email: raw.email,
225
+ name: raw.name,
226
+ role: raw.role,
227
+ status: raw.status,
228
+ permissions: raw.permissions ?? [],
229
+ createdAt: raw.created_at,
230
+ lastLoginAt: raw.last_login_at
231
+ };
232
+ }
233
+ function isBlank(value) {
234
+ return typeof value !== "string" || value.trim() === "";
235
+ }
236
+ function userPath(userId, suffix = "") {
237
+ if (isBlank(userId)) {
238
+ throw new UserIDRequiredError();
239
+ }
240
+ return `/api/users/${encodeURIComponent(userId.trim())}${suffix}`;
241
+ }
242
+ async function apiServiceRequest(http, isClosed, method, path, body) {
243
+ if (isClosed()) {
244
+ throw new ClientClosedError();
245
+ }
246
+ return http.request({
247
+ endpoint: `${http.options.apiServiceUrl.replace(/\/+$/, "")}${path}`,
248
+ method,
249
+ body,
250
+ isApiService: true
251
+ });
252
+ }
253
+ var UsersService = class {
254
+ constructor(http, isClosed = () => false) {
255
+ this.http = http;
256
+ this.isClosed = isClosed;
257
+ }
258
+ http;
259
+ isClosed;
260
+ /** Returns the members of the organization. */
261
+ async list() {
262
+ const raw = await this.send("GET", "/api/users");
263
+ return (raw ?? []).map(toUser);
264
+ }
265
+ /** Returns a single member of the organization. */
266
+ async get(userId) {
267
+ return toUser(await this.send("GET", userPath(userId)));
268
+ }
269
+ /** Returns the roles available to the organization and their permissions. */
270
+ async listRoles() {
271
+ const raw = await this.send(
272
+ "GET",
273
+ "/api/users/roles"
274
+ );
275
+ return (raw ?? []).map((r) => ({ id: r.id, permissions: r.permissions ?? [] }));
276
+ }
277
+ /**
278
+ * Creates an invitation and emails it to the recipient.
279
+ * Throws InvitationPendingError if a pending invitation already exists for the email,
280
+ * and UserAlreadyExistsError if the email already belongs to the organization.
281
+ */
282
+ async invite(req) {
283
+ if (isBlank(req?.email)) {
284
+ throw new EmailRequiredError();
285
+ }
286
+ if (isBlank(req.role)) {
287
+ throw new RoleRequiredError();
288
+ }
289
+ const raw = await this.send("POST", "/api/users/invite", {
290
+ email: req.email,
291
+ role: req.role,
292
+ inviter_name: req.inviterName || void 0,
293
+ lang: req.lang || void 0
294
+ });
295
+ return {
296
+ email: raw.email,
297
+ role: raw.role,
298
+ status: raw.status,
299
+ inviteUrl: raw.invite_url,
300
+ expiresAt: raw.expires_at
301
+ };
302
+ }
303
+ /**
304
+ * Changes the role of a member. The new permissions apply on the user's next sign-in.
305
+ * Throws LastAdminError if the change would leave the organization without an admin.
306
+ */
307
+ async updateRole(userId, role) {
308
+ if (isBlank(role)) {
309
+ throw new RoleRequiredError();
310
+ }
311
+ return toUser(await this.send("PATCH", userPath(userId, "/role"), { role }));
312
+ }
313
+ /**
314
+ * Revokes a member's access to the organization.
315
+ * Throws LastAdminError if the member is the last admin.
316
+ */
317
+ async remove(userId) {
318
+ await this.send("DELETE", userPath(userId));
319
+ }
320
+ send(method, path, body) {
321
+ return apiServiceRequest(this.http, this.isClosed, method, path, body);
322
+ }
323
+ };
324
+
325
+ // src/validation.ts
326
+ function validateCoordinates(lat, lng) {
327
+ if (typeof lat !== "number" || Number.isNaN(lat) || lat < -90 || lat > 90) {
328
+ throw new InvalidLatitudeError();
329
+ }
330
+ if (typeof lng !== "number" || Number.isNaN(lng) || lng < -180 || lng > 180) {
331
+ throw new InvalidLongitudeError();
332
+ }
333
+ }
334
+ function validateDeviceId(deviceId) {
335
+ if (!deviceId || typeof deviceId !== "string" || deviceId.trim() === "") {
336
+ throw new DeviceIDRequiredError();
337
+ }
338
+ return deviceId.trim();
339
+ }
340
+ function validateGeofenceId(geofenceId) {
341
+ if (!geofenceId || typeof geofenceId !== "string" || geofenceId.trim() === "") {
342
+ throw new GeofenceIDRequiredError();
343
+ }
344
+ return geofenceId.trim();
345
+ }
346
+ function validateAndNormalizePolygon(coordinates) {
347
+ if (!Array.isArray(coordinates) || coordinates.length < 3) {
348
+ throw new InvalidCoordinatesError();
349
+ }
350
+ const polygon = [];
351
+ for (const p of coordinates) {
352
+ if (!Array.isArray(p) || p.length !== 2) {
353
+ throw new ValidationError(
354
+ `geoengine: invalid coordinate format: ${JSON.stringify(p)} (expected [lat, lng])`
355
+ );
356
+ }
357
+ const lat = p[0];
358
+ const lng = p[1];
359
+ validateCoordinates(lat, lng);
360
+ polygon.push([lng, lat]);
361
+ }
362
+ const first = polygon[0];
363
+ const last = polygon[polygon.length - 1];
364
+ if (first[0] !== last[0] || first[1] !== last[1]) {
365
+ polygon.push([first[0], first[1]]);
366
+ }
367
+ return polygon;
368
+ }
369
+
370
+ // src/geoidentity.ts
371
+ var RuleActions = {
372
+ Allow: "ALLOW",
373
+ Block: "BLOCK",
374
+ Challenge: "CHALLENGE"
375
+ };
376
+ var SubjectTypes = {
377
+ User: "USER",
378
+ Role: "ROLE",
379
+ Device: "DEVICE",
380
+ All: "ALL"
381
+ };
382
+ function toRule(raw) {
383
+ return {
384
+ id: raw.id,
385
+ orgId: raw.org_id,
386
+ name: raw.name,
387
+ description: raw.description,
388
+ priority: raw.priority ?? 0,
389
+ action: raw.action,
390
+ isActive: Boolean(raw.is_active),
391
+ whiteIpList: raw.white_ip_list ?? [],
392
+ blackIpList: raw.black_ip_list ?? [],
393
+ blockDatacenter: Boolean(raw.block_datacenter),
394
+ blockTor: Boolean(raw.block_tor),
395
+ riskAccepted: raw.risk_accepted ?? 0,
396
+ geoLimit: raw.geo_limit,
397
+ assignedSubjects: (raw.assigned_subjects ?? []).map((s) => ({
398
+ subjectType: s.subject_type,
399
+ subjectId: s.subject_id
400
+ })),
401
+ subjectsCount: raw.subjects_count ?? 0,
402
+ createdAt: raw.created_at,
403
+ updatedAt: raw.updated_at
404
+ };
405
+ }
406
+ function toWire(req) {
407
+ return {
408
+ name: req.name,
409
+ description: req.description,
410
+ priority: req.priority,
411
+ action: req.action,
412
+ is_active: req.isActive,
413
+ white_ip_list: req.whiteIpList,
414
+ black_ip_list: req.blackIpList,
415
+ block_datacenter: req.blockDatacenter,
416
+ block_tor: req.blockTor,
417
+ risk_accepted: req.riskAccepted,
418
+ geo_limit: req.geoLimit,
419
+ assigned_subjects: req.assignedSubjects?.map((s) => ({
420
+ subject_type: s.subjectType,
421
+ subject_id: s.subjectId
422
+ }))
423
+ };
424
+ }
425
+ var RULES_PATH = "/api/users/geoidentity/rules";
426
+ function rulePath(ruleId, suffix = "") {
427
+ if (typeof ruleId !== "string" || ruleId.trim() === "") {
428
+ throw new RuleIDRequiredError();
429
+ }
430
+ return `${RULES_PATH}/${encodeURIComponent(ruleId.trim())}${suffix}`;
431
+ }
432
+ function requireUserId(userId) {
433
+ if (typeof userId !== "string" || userId.trim() === "") {
434
+ throw new UserIDRequiredError();
435
+ }
436
+ return userId.trim();
437
+ }
438
+ var GeoIdentityService = class {
439
+ constructor(http, isClosed = () => false) {
440
+ this.http = http;
441
+ this.isClosed = isClosed;
442
+ }
443
+ http;
444
+ isClosed;
445
+ /** Creates a GeoIdentity rule. */
446
+ async createRule(req) {
447
+ if (typeof req?.name !== "string" || req.name.trim() === "") {
448
+ throw new RuleNameRequiredError();
449
+ }
450
+ return toRule(await this.send("POST", RULES_PATH, toWire(req)));
451
+ }
452
+ /**
453
+ * Returns the organization's rules ordered by priority.
454
+ * Use getRule to load a rule's assigned subjects.
455
+ */
456
+ async listRules(opts = {}) {
457
+ const query = typeof opts.isActive === "boolean" ? `?is_active=${opts.isActive}` : "";
458
+ const raw = await this.send("GET", RULES_PATH + query);
459
+ return (raw ?? []).map(toRule);
460
+ }
461
+ /** Returns a rule including its assigned subjects. */
462
+ async getRule(ruleId) {
463
+ return toRule(await this.send("GET", rulePath(ruleId)));
464
+ }
465
+ /** Partially updates a rule. */
466
+ async updateRule(ruleId, req) {
467
+ return toRule(await this.send("PATCH", rulePath(ruleId), toWire(req ?? {})));
468
+ }
469
+ /** Deletes a rule and all of its assignments. */
470
+ async deleteRule(ruleId) {
471
+ await this.send("DELETE", rulePath(ruleId));
472
+ }
473
+ /** Applies the rule to a member of the organization. Assigning twice is a no-op. */
474
+ async assignToUser(ruleId, userId) {
475
+ return this.changeAssignment("POST", ruleId, { scope: "user", user_id: requireUserId(userId) });
476
+ }
477
+ /** Applies the rule to every member of the organization. */
478
+ async assignToOrganization(ruleId) {
479
+ return this.changeAssignment("POST", ruleId, { scope: "organization" });
480
+ }
481
+ /**
482
+ * Removes a user assignment from the rule.
483
+ * Throws LastSubjectError if it is the rule's only subject; deactivate or delete the rule instead.
484
+ */
485
+ async unassignFromUser(ruleId, userId) {
486
+ return this.changeAssignment("DELETE", ruleId, { scope: "user", user_id: requireUserId(userId) });
487
+ }
488
+ /**
489
+ * Removes the organization-wide assignment from the rule.
490
+ * Throws LastSubjectError if it is the rule's only subject.
491
+ */
492
+ async unassignFromOrganization(ruleId) {
493
+ return this.changeAssignment("DELETE", ruleId, { scope: "organization" });
494
+ }
495
+ /**
496
+ * Returns the rules that apply to a user: assigned directly, through the user's role,
497
+ * or to the whole organization.
498
+ */
499
+ async listUserRules(userId) {
500
+ const raw = await this.send("GET", userPath(userId, "/geoidentity/rules"));
501
+ return (raw ?? []).map(toRule);
502
+ }
503
+ async changeAssignment(method, ruleId, payload) {
504
+ return toRule(await this.send(method, rulePath(ruleId, "/assignments"), payload));
505
+ }
506
+ send(method, path, body) {
507
+ return apiServiceRequest(this.http, this.isClosed, method, path, body);
508
+ }
509
+ };
510
+ function polygonFromLatLng(coordinates) {
511
+ return { type: "Polygon", coordinates: [validateAndNormalizePolygon(coordinates)] };
512
+ }
126
513
 
127
514
  // src/crypto.ts
128
515
  import { createHmac } from "crypto";
@@ -134,7 +521,7 @@ function generateHMACSignature(key, timestamp) {
134
521
  }
135
522
 
136
523
  // src/http.ts
137
- var USER_AGENT = "GeoEngineNodeSDK/2.0.0";
524
+ var USER_AGENT = "GeoEngineNodeSDK/2.1.0";
138
525
  function parseHttpError(statusCode, bodyText, isSpatial = false) {
139
526
  let parsedErrorContainer = null;
140
527
  try {
@@ -192,6 +579,59 @@ function parseHttpError(statusCode, bodyText, isSpatial = false) {
192
579
  }
193
580
  return new APIError(statusCode, message);
194
581
  }
582
+ function parseApiServiceError(statusCode, bodyText) {
583
+ let parsed = null;
584
+ try {
585
+ parsed = JSON.parse(bodyText);
586
+ } catch {
587
+ }
588
+ const container = parsed && typeof parsed === "object" ? parsed.error : void 0;
589
+ const details = Array.isArray(container?.details) ? container.details : [];
590
+ let code = "";
591
+ let message = "";
592
+ if (container && typeof container === "object") {
593
+ code = container.status ?? "";
594
+ message = container.message ?? "";
595
+ const withReason = details.find((d) => d?.reason);
596
+ if (withReason?.reason) {
597
+ code = withReason.reason;
598
+ }
599
+ } else {
600
+ message = bodyText.trim();
601
+ }
602
+ if (!message) {
603
+ message = `HTTP ${statusCode}`;
604
+ }
605
+ switch (code) {
606
+ case "USER_NOT_FOUND":
607
+ case "USER_REVOKED":
608
+ return new UserNotFoundError(message, statusCode, code, details);
609
+ case "RULE_NOT_FOUND":
610
+ return new RuleNotFoundError(message, statusCode, code, details);
611
+ case "USER_ALREADY_EXISTS":
612
+ return new UserAlreadyExistsError(message, statusCode, code, details);
613
+ case "INVITATION_PENDING":
614
+ return new InvitationPendingError(message, statusCode, code, details);
615
+ case "LAST_ADMIN":
616
+ return new LastAdminError(message, statusCode, code, details);
617
+ case "LAST_SUBJECT":
618
+ return new LastSubjectError(message, statusCode, code, details);
619
+ case "QUOTA_EXCEEDED":
620
+ return new QuotaExceededError(message, statusCode, details);
621
+ case "MISSING_API_KEY":
622
+ case "MISSING_ORGANIZATION":
623
+ return new AuthenticationError(message, statusCode, details);
624
+ }
625
+ switch (statusCode) {
626
+ case 401:
627
+ return new AuthenticationError(message, statusCode, details);
628
+ case 403:
629
+ return new ForbiddenError(message, statusCode, details);
630
+ case 402:
631
+ return new QuotaExceededError(message, statusCode, details);
632
+ }
633
+ return new APIServiceError(statusCode, code, message, details);
634
+ }
195
635
  var HttpClient = class {
196
636
  config;
197
637
  constructor(options = {}) {
@@ -222,7 +662,7 @@ var HttpClient = class {
222
662
  async request(opts) {
223
663
  const method = opts.method ?? "POST";
224
664
  const timeoutMs = opts.timeout ?? this.config.timeout;
225
- const maxRetries = this.config.maxRetries;
665
+ const maxRetries = opts.isApiService && method !== "GET" ? 0 : this.config.maxRetries;
226
666
  let attempt = 0;
227
667
  while (true) {
228
668
  attempt++;
@@ -230,13 +670,16 @@ var HttpClient = class {
230
670
  const timeoutId = globalThis.setTimeout(() => controller.abort(), timeoutMs);
231
671
  const now = Date.now();
232
672
  const headers = {
233
- "Content-Type": "application/json",
673
+ ...opts.isApiService ? { Accept: "application/json" } : { "Content-Type": "application/json" },
234
674
  "X-API-Key": this.config.apiKey,
235
675
  "X-Geo-Environment": this.config.environment,
236
676
  "X-Request-Time": now.toString(),
237
677
  "X-Signature": generateHMACSignature(this.config.apiKey, now),
238
678
  "User-Agent": USER_AGENT
239
679
  };
680
+ if (opts.isApiService && opts.body !== void 0) {
681
+ headers["Content-Type"] = "application/json";
682
+ }
240
683
  if (this.config.jwtToken) {
241
684
  headers["Authorization"] = `Bearer ${this.config.jwtToken}`;
242
685
  }
@@ -263,15 +706,15 @@ var HttpClient = class {
263
706
  }
264
707
  const responseText = await response.text();
265
708
  if (!response.ok) {
266
- throw parseHttpError(response.status, responseText, opts.isSpatial);
709
+ throw opts.isApiService ? parseApiServiceError(response.status, responseText) : parseHttpError(response.status, responseText, opts.isSpatial);
267
710
  }
268
711
  if (!responseText || responseText.trim() === "") {
269
712
  return null;
270
713
  }
271
714
  const json = JSON.parse(responseText);
272
- if (opts.isSpatial && typeof json === "object" && json !== null && "success" in json) {
715
+ if ((opts.isSpatial || opts.isApiService) && typeof json === "object" && json !== null && "success" in json) {
273
716
  if (!json.success) {
274
- throw parseHttpError(response.status, responseText, true);
717
+ throw opts.isApiService ? parseApiServiceError(response.status, responseText) : parseHttpError(response.status, responseText, true);
275
718
  }
276
719
  return json.data;
277
720
  }
@@ -500,51 +943,6 @@ var SpatialGeneralResult = class {
500
943
  }
501
944
  };
502
945
 
503
- // src/validation.ts
504
- function validateCoordinates(lat, lng) {
505
- if (typeof lat !== "number" || Number.isNaN(lat) || lat < -90 || lat > 90) {
506
- throw new InvalidLatitudeError();
507
- }
508
- if (typeof lng !== "number" || Number.isNaN(lng) || lng < -180 || lng > 180) {
509
- throw new InvalidLongitudeError();
510
- }
511
- }
512
- function validateDeviceId(deviceId) {
513
- if (!deviceId || typeof deviceId !== "string" || deviceId.trim() === "") {
514
- throw new DeviceIDRequiredError();
515
- }
516
- return deviceId.trim();
517
- }
518
- function validateGeofenceId(geofenceId) {
519
- if (!geofenceId || typeof geofenceId !== "string" || geofenceId.trim() === "") {
520
- throw new GeofenceIDRequiredError();
521
- }
522
- return geofenceId.trim();
523
- }
524
- function validateAndNormalizePolygon(coordinates) {
525
- if (!Array.isArray(coordinates) || coordinates.length < 3) {
526
- throw new InvalidCoordinatesError();
527
- }
528
- const polygon = [];
529
- for (const p of coordinates) {
530
- if (!Array.isArray(p) || p.length !== 2) {
531
- throw new ValidationError(
532
- `geoengine: invalid coordinate format: ${JSON.stringify(p)} (expected [lat, lng])`
533
- );
534
- }
535
- const lat = p[0];
536
- const lng = p[1];
537
- validateCoordinates(lat, lng);
538
- polygon.push([lng, lat]);
539
- }
540
- const first = polygon[0];
541
- const last = polygon[polygon.length - 1];
542
- if (first[0] !== last[0] || first[1] !== last[1]) {
543
- polygon.push([first[0], first[1]]);
544
- }
545
- return polygon;
546
- }
547
-
548
946
  // src/spatial.ts
549
947
  var SpatialService = class {
550
948
  constructor(http) {
@@ -730,6 +1128,22 @@ var GeoEngine = class {
730
1128
  * Alias for spatial (to maintain exact casing compatibility with Go client.Spatial).
731
1129
  */
732
1130
  Spatial;
1131
+ /**
1132
+ * Users manages organization members, roles and invitations.
1133
+ */
1134
+ users;
1135
+ /**
1136
+ * Alias for users (matches Go client.Users).
1137
+ */
1138
+ Users;
1139
+ /**
1140
+ * GeoIdentity manages GeoIdentity access rules for users and the organization.
1141
+ */
1142
+ geoIdentity;
1143
+ /**
1144
+ * Alias for geoIdentity (matches Go client.GeoIdentity).
1145
+ */
1146
+ GeoIdentity;
733
1147
  /**
734
1148
  * Initializes a new GeoEngine client instance.
735
1149
  *
@@ -751,6 +1165,11 @@ var GeoEngine = class {
751
1165
  this.http = new HttpClient(resolvedOptions);
752
1166
  this.spatial = new SpatialService(this.http);
753
1167
  this.Spatial = this.spatial;
1168
+ const isClosed = () => this.isClosed;
1169
+ this.users = new UsersService(this.http, isClosed);
1170
+ this.Users = this.users;
1171
+ this.geoIdentity = new GeoIdentityService(this.http, isClosed);
1172
+ this.GeoIdentity = this.geoIdentity;
754
1173
  }
755
1174
  /**
756
1175
  * Current configuration options.
@@ -887,31 +1306,50 @@ var GeoEngine = class {
887
1306
  var index_default = GeoEngine;
888
1307
  export {
889
1308
  APIError,
1309
+ APIServiceError,
890
1310
  AsyncIngester,
891
1311
  AuthenticationError,
892
1312
  GeoEngine as Client,
893
1313
  ClientClosedError,
894
1314
  DeviceIDRequiredError,
1315
+ EmailRequiredError,
895
1316
  ForbiddenError,
896
1317
  GeneralGeofenceCheck,
897
1318
  GeoEngine,
898
1319
  GeoEngineError,
1320
+ GeoIdentityService,
899
1321
  GeofenceIDRequiredError,
900
1322
  GeofenceNotFoundError,
901
1323
  InvalidCoordinatesError,
902
1324
  InvalidLatitudeError,
903
1325
  InvalidLongitudeError,
1326
+ InvitationPendingError,
1327
+ LastAdminError,
1328
+ LastSubjectError,
904
1329
  QuotaExceededError,
1330
+ RoleRequiredError,
1331
+ Roles,
1332
+ RuleActions,
1333
+ RuleIDRequiredError,
1334
+ RuleNameRequiredError,
1335
+ RuleNotFoundError,
905
1336
  SingleGeofenceCheck,
906
1337
  SpatialAPIError,
907
1338
  SpatialCheckBuilder,
908
1339
  SpatialGeneralResult,
909
1340
  SpatialService,
910
1341
  SpatialValidationResult,
1342
+ SubjectTypes,
911
1343
  TimeoutError,
1344
+ UserAlreadyExistsError,
1345
+ UserIDRequiredError,
1346
+ UserNotFoundError,
1347
+ UserStatus,
1348
+ UsersService,
912
1349
  ValidationError,
913
1350
  index_default as default,
914
1351
  generateHMACSignature,
1352
+ polygonFromLatLng,
915
1353
  validateAndNormalizePolygon,
916
1354
  validateCoordinates,
917
1355
  validateDeviceId,