Skip to content

WEB-2394 family locator sdk bridge methods - #247

Merged
atabel merged 3 commits into
masterfrom
atoledano-family-locator
Feb 23, 2026
Merged

WEB-2394 family locator sdk bridge methods#247
atabel merged 3 commits into
masterfrom
atoledano-family-locator

Conversation

@atabel

@atabel atabel commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

closes #246

Comment thread README.md

### getLocatorSdkVersion

<kbd>App version >= TBD</kbd>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending to define min app version

Comment thread src/family-locator.ts Outdated
// https://telefonicacorp.sharepoint.com/:w:/r/sites/Colabora_TCX/_layouts/15/Doc.aspx?sourcedoc=%7BD524FA49-9937-4D20-958A-7055D67B65DB%7D&file=Shared%20Spec%20%25u2013%20OBVIVO-3177%20-%20Family%20locator.docx&nav=eyJjIjoxMjA3NDU5NjUzfQ&action=default&mobileredirect=true

export type LocatorSdkMode = 'default' | 'observed' | 'sos';
export type LocatorSdkConfig = Record<string, unknown>;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this lose type enough or can we define a more strict type here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it will change very often, but I don't see if there's any benefit of having a strict type here

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this type work?

The information to be sent is really complex:

{
"id": "a5a70879-fxxxx",
"requestId": "req_config_01",
"timestamp": 1764612254353,
"data": {
"license": "xxxxx",
"sdkVersion": "2.0.1",
"osPlatform": "android",
"api": {
"token": "eyJhbGciOiJIUzI1.....",
"certUrl": "https://../cert",
"tokenUrl": "https://.../token",
"scopesUrl": "https://.../scopes",
"configUrl": "https://.../config",
"groupsUrl": "https://.../groups",
"featuresUrl": "https://.../features",
"geofencesUrl": "https://.../geofences"
},
"mqtt": {
"clientId": "xxx",
"broker": "databroker.com",
"port": "8883",
"username": "xxxx"
},
"process": {
"offlineRetentionDays": 30,
"retryPolicy": {
"maxRetries": 10,

[...]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@pbartolome pbartolome Feb 18, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc defines these types, so we can use the same definition, these is what will go inside "data"

export interface LocatorConfig {
  license: string;
  sdkVersion: string;
  osPlatform: string;
  api: LocatorApiConfig;
  mqtt: LocatorMqttConfig;
  process: LocatorProcessConfig;
  battery?: LocatorBatteryConfig;
  motion?: LocatorMotionConfig;
  collect?: LocatorCollectConfig;
  audioRecord?: LocatorAudioRecord;
  revision?: number;
  createdAt?: number;
  updatedAt?: number;
}

export interface LocatorApiConfig {
  token: string;
  certUrl?: string;
  scopesUrl?: string;
  tokenUrl?: string;
  configUrl?: string;
  groupsUrl?: string;
  featuresUrl?: string;
  geofencesUrl?: string;
}

export interface LocatorMqttConfig {
  clientId?: string;
  broker?: string;
  port?: string;
  username?: string;
}

export interface LocatorRetryPolicy {
  maxRetries?: number;
  baseDelayMs?: number;
  backoffFactor?: number;
}

export interface LocatorProcessConfig {
  retryPolicy?: LocatorRetryPolicy;
  offlineRetentionDays?: number;
  foregroundServiceNotification?: {
    title?: string;
    message?: string;
  };
}

export interface LocatorBatteryEvent {
  name: string;
  min: number;
  max: number;
  interval: number;
  charging: boolean;
  powerMode: LocatorPowerMode[];
}

export enum LocatorPowerMode {
  NORMAL = "normal",
  POWER_SAVER = "power_saver",
  SUPER_SAVER = "super_saver",
}

export interface LocatorBatteryConfig {
  events?: LocatorBatteryEvent[];
}

export interface LocatorMotionConfig {
  sensitivity?: number;
}

export interface LocatorCollectConfig {
  collectIntervalMillis?: number;
  sendIntervalMillis?: number;
  minDisplacementMeters?: number;
  maxTravelDistanceMeters?: number;
  highAccuracy?: boolean;
  maxBatchSize?: number;
}

export interface LocatorAudioRecord {
  recordsCount: number;
  durationSeconds: number;
  retryCount: number;
  intervalSeconds: number;
  audioServiceNotification?: {
    title?: string;
    message?: string;
  };
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the type

Comment thread src/family-locator.ts Outdated

@DevPabloGarcia DevPabloGarcia left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Comment thread src/family-locator.ts Outdated
@atabel
atabel requested a review from dzayas February 19, 2026 07:55
@atabel
atabel merged commit 5e4a0ba into master Feb 23, 2026
2 checks passed
@atabel
atabel deleted the atoledano-family-locator branch February 23, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Family Locator web view bridge methods

4 participants