diff --git a/src/InboundGarminWrapper.ts b/src/InboundGarminWrapper.ts index df38cd1..ec5c253 100644 --- a/src/InboundGarminWrapper.ts +++ b/src/InboundGarminWrapper.ts @@ -3,6 +3,7 @@ import { Buffer } from 'node:buffer'; import { request } from './request'; import type { BaseGetOpts, + DeviceConfig, DevicesKey, EmergencyState, History, @@ -182,4 +183,25 @@ export class InboundGarminWrapper { const opts = Object.assign(this.baseGetOpts, options); return await request(`https://${this.IPCUrl}/IPCInbound/V1/Pingback.svc/Version`, opts); } + + /** + * @see https://explore.garmin.com/IPCInbound/docs/#!/Configuration.svc/GetAvailableConfigurationsGET + * + * @params options + */ + + public async getConfigurationDeviceConfig(options: RequestInit = {}) { + const opts = Object.assign(this.baseGetOpts, options); + return await request(`https://${this.IPCUrl}/IPCInbound/V1/Configuration.svc/DeviceConfig`, opts); + } + + /** + * @see https://explore.garmin.com/IPCInbound/docs/#!/Configuration.svc/VersionGET + * + * @params options + */ + public async getConfigurationVersion(options: RequestInit = {}) { + const opts = Object.assign(this.baseGetOpts, options); + return await request(`https://${this.IPCUrl}/IPCInbound/V1/Configuration.svc/Version`, opts); + } } diff --git a/src/types.ts b/src/types.ts index 4e43208..e1a471e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -78,3 +78,24 @@ export type EmergencyState = { IMEI: number; State: string; }; + +export type DeviceConfig = { + AcceptedValues: string; + AcceptedValuesDesc: string; + BundleTrackEnabled: boolean; + Category: string; + ConfigEditable: boolean; + ConfigRemovable: boolean; + ConsumerEnabled: boolean; + DefaultConfig: string; + DefaultSetting: string; + Description: string | null; + DeviceKey: number; + DeviceTypes: number; + DisplayName: string; + EnterpriseEnabled: boolean; + ExploreExposed: boolean; + Id: number; + Name: string; + UnitString: string | null; +};