@telemetryos/root-sdk 1.4.1 → 1.4.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @telemetryos/root-sdk
2
2
 
3
+ ## 1.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix doc comments
8
+
9
+ ## 1.4.2
10
+
11
+ ### Patch Changes
12
+
13
+ - improve ux of init command
14
+
3
15
  ## 1.4.1
4
16
 
5
17
  ### Patch Changes
package/dist/client.d.ts CHANGED
@@ -128,10 +128,10 @@ export declare class Client {
128
128
  */
129
129
  get media(): Media;
130
130
  /**
131
- * Provides access to the proxy API for fetching third-party content through the TelemetryOS proxy service.
131
+ * Provides access to the proxy API for fetching third-party content through the TelemetryOS API.
132
132
  *
133
133
  * This property returns a new Proxy instance that allows applications to fetch content from external
134
- * URLs through the platform's proxy service, which handles authentication, caching, and CORS issues.
134
+ * URLs through the platform, which handles authentication, caching, and CORS issues.
135
135
  *
136
136
  * NOTE: Most application developers should use the global proxy() function
137
137
  * instead of accessing this property directly.
@@ -172,8 +172,7 @@ export declare class Client {
172
172
  * Provides access to the weather API for retrieving weather data.
173
173
  *
174
174
  * This property returns a new Weather instance that allows applications to fetch
175
- * current weather conditions and forecasts from various providers (WeatherBit, AccuWeather)
176
- * through the General Integrations Service.
175
+ * current weather conditions and forecasts through the TelemetryOS API.
177
176
  *
178
177
  * NOTE: Most application developers should use the global weather() function
179
178
  * instead of accessing this property directly.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-JDXm3DEz.cjs"),B="1.4.1",k={version:B};class H{constructor(e){this._client=e}async getCurrent(){const e=await this._client.request("accounts.getCurrent",{});if(!e.success)throw new Error("Failed to fetch current account");return e.account}}class q{constructor(e){this._client=e}async getAllByMountPoint(e){return(await this._client.request("applications.getAllByMountPoint",{mountPoint:e})).applications}async getByName(e){return(await this._client.request("applications.getByName",{name:e})).application}async setDependencies(e){return await this._client.request("applications.setDependencies",{applicationSpecifiers:e})}}class A{constructor(e){this._client=e}async getInformation(){const e=await this._client.request("devices.getInformation",{});if(!e.success)throw new Error("Failed to get device information");return e.deviceInformation}}function T(o,e=console.error){o().catch(e)}class ${constructor(e){this._client=e}async getColorScheme(){return(await this._client.request("environment.getColorScheme",{})).colorScheme}subscribeColorScheme(e){T(async()=>{this._client.on("environment.colorSchemeChanged",e),e(await this.getColorScheme())})}unsubscribeColorScheme(e){this._client.off("environment.colorSchemeChanged",e)}}class E{constructor(e){this._client=e}async getAllFolders(){return(await this._client.request("mediaFolders.getAll",{})).folders}async getAllByFolderId(e){return(await this._client.request("media.getAllByFolderId",{folderId:e})).contents}async getAllByTag(e){return(await this._client.request("media.getAllByTag",{tagName:e})).contents}async getById(e){return(await this._client.request("media.getById",{id:e})).content}}class I{constructor(e){this._client=e}get application(){return new y("application","",this._client)}get instance(){return new y("instance",this._client.applicationSpecifier,this._client)}get device(){return new y("device",this._client.applicationSpecifier,this._client)}shared(e){return new y("shared",e,this._client)}}class y{constructor(e,t,n){this._kind=e,this._namespace=t,this._client=n}async set(e,t){return(await this._client.request("store.set",{kind:this._kind,namespace:this._namespace,key:e,value:t})).success}async get(e){return(await this._client.request("store.get",{kind:this._kind,namespace:this._namespace,key:e})).value}async subscribe(e,t){return(await this._client.subscribe("store.subscribe",{kind:this._kind,namespace:this._namespace,key:e},t)).success}async unsubscribe(e,t){return(await this._client.unsubscribe("store.unsubscribe",{kind:this._kind,namespace:this._namespace,key:e},t)).success}async delete(e){return(await this._client.request("store.delete",{kind:this._kind,namespace:this._namespace,key:e})).success}}class P{constructor(e){this._client=e}async getCurrent(){const e=await this._client.request("users.getCurrent",{});if(!e.success)throw new Error("Failed to fetch current user");return e.user}}class M{constructor(e){this._client=e}async getConditions(e){const t=await this._client.request("weather.getConditions",e);if(!t.success||!t.conditions)throw new Error(t.error||"Failed to fetch weather conditions");return t.conditions}async getDailyForecast(e){const t=await this._client.request("weather.getDailyForecast",e);if(!t.success||!t.forecast)throw new Error(t.error||"Failed to fetch daily forecast");return t.forecast}async getHourlyForecast(e){const t=await this._client.request("weather.getHourlyForecast",e);if(!t.success||!t.forecast)throw new Error(t.error||"Failed to fetch hourly forecast");return t.forecast}async getAccuWeatherConditions(e){const t=await this._client.request("weather.getAccuWeatherConditions",e);if(!t.success||!t.data)throw new Error(t.error||"Failed to fetch AccuWeather conditions");return t.data}async getAccuWeatherDailyForecast(e){const t=await this._client.request("weather.getAccuWeatherDailyForecast",e);if(!t.success||!t.data)throw new Error(t.error||"Failed to fetch AccuWeather daily forecast");return t.data}async getAccuWeatherHourlyForecast(e){const t=await this._client.request("weather.getAccuWeatherHourlyForecast",e);if(!t.success||!t.data)throw new Error(t.error||"Failed to fetch AccuWeather hourly forecast");return t.data}}const x=N.z.object({name:N.z.string(),data:N.z.any()});class W{constructor(e){if(e._client._applicationSpecifier!=="rootSettingsNavigation")throw new Error("RootSettingsNavigation can only be used in the rootSettingsNavigation mount point");this._store=e}async setRootSettingsNavigation(e){const t=this._store.shared("root-settings-navigation"),n=await t.get("navigation"),r=this._store._client._applicationSpecifier;n[r]={applicationSpecifier:r,entries:e.entries},t.set("navigation",n)}async getRootSettingsNavigation(){const t=await this._store.shared("root-settings-navigation").get("navigation"),n=this._store._client._applicationSpecifier;return t[n]}async getAllRootSettingsNavigation(){return this._store.shared("root-settings-navigation").get("navigation")}}class D{constructor(e){this._client=e}async fetch(e,t){let n;typeof e=="string"?n=e:e instanceof URL?n=e.toString():(n=e.url,t||(t={method:e.method,headers:e.headers,body:e.body,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity}));let r={};t!=null&&t.headers&&(t.headers instanceof Headers?t.headers.forEach((p,c)=>{r[c]=p}):Array.isArray(t.headers)?t.headers.forEach(([p,c])=>{r[p]=c}):r=t.headers);const s=await this._client.request("proxy.fetch",{url:n,method:(t==null?void 0:t.method)||"GET",headers:r,body:(t==null?void 0:t.body)||null});if(!s.success)throw new Error(`Proxy fetch failed: ${s.statusText}`);const l=new Headers(s.headers),u={status:s.status,statusText:s.statusText,headers:l};let a=null;return s.body!==null&&s.body!==void 0&&(typeof s.body=="string"||s.body instanceof ArrayBuffer?a=s.body:typeof s.body=="object"&&(a=JSON.stringify(s.body))),new Response(a,u)}}const g=1e3*30;class C{constructor(e){this._applicationName=e,this._applicationInstance="",this._applicationSpecifier="",this._onHandlers=new Map,this._onceHandlers=new Map,this._subscriptionNamesByHandler=new Map,this._subscriptionNamesBySubjectName=new Map}get accounts(){return new H(this)}get users(){return new P(this)}get store(){return new I(this)}get applications(){return new q(this)}get media(){return new E(this)}get proxy(){return new D(this)}get devices(){return new A(this)}get rootSettingsNavigation(){return new W(this.store)}get weather(){return new M(this)}get applicationName(){return this._applicationName}get applicationSpecifier(){return this._applicationSpecifier}get applicationInstance(){return this._applicationInstance}bind(){var e;const t=new URL(window.location.href),n=t.searchParams;this._applicationInstance=(e=n.get("telemetryApplicationId"))!==null&&e!==void 0?e:"";const r=n.get("applicationSpecifier");if(r)this._applicationSpecifier=r;else{const s=t.hostname.split(".");this._applicationSpecifier=s[0]||""}if(!this._applicationSpecifier||this._applicationSpecifier.length!==40)throw new Error(`Invalid applicationSpecifier: expected 40-character hash, got "${this._applicationSpecifier}"`);if(!this._applicationInstance)throw new Error("Missing telemetryApplicationId query parameter");this._windowMessageHandler=s=>{if(s.source===window)return;for(let c=0;c<window.frames.length;c+=1)window.frames[c].postMessage(s.data,"*");const l=x.safeParse(s.data);if(!l.success)return;const u=l.data,a=this._onHandlers.get(u.name),p=this._onceHandlers.get(u.name);if(a)for(const c of a)c(u.data);if(p){for(const c of p)c(u.data);this._onceHandlers.delete(u.name)}},window.addEventListener("message",this._windowMessageHandler)}unbind(){this._windowMessageHandler&&window.removeEventListener("message",this._windowMessageHandler)}send(e,t){const n={telemetrySdkVersion:w,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t};window.parent.postMessage(n,"*")}request(e,t){const n=b(),r={telemetrySdkVersion:w,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t,responseName:n};window.parent.postMessage(r,"*");let s=!1,l;const u=new Promise((p,c)=>{const d=new Error(`${e} message request with response name of ${n} timed out after ${g}`);setTimeout(()=>{s=!0,this.off(n,l),c(d)},g)}),a=new Promise(p=>{l=c=>{s||p(c)},this.once(n,p)});return Promise.race([u,a])}async subscribe(e,t,n){let r,s;typeof t=="function"?s=t:(r=t,s=n);const l=b(),u=b();let a=this._subscriptionNamesBySubjectName.get(e);a||(a=[],this._subscriptionNamesBySubjectName.set(e,a)),a.push(l),this._subscriptionNamesByHandler.set(s,l),this.on(l,s);const p={telemetrySdkVersion:w,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:r,responseName:u,subscriptionName:l};window.parent.postMessage(p,"*");let c=!1,d;const S=new Promise((_,f)=>{const m=new Error(`${e} subscribe request with subscription name of ${l} and response name of ${u} timed out after ${g}`);setTimeout(()=>{c=!0,this.off(u,d),f(m)},g)}),v=new Promise(_=>{d=f=>{c||_(f)},this.on(u,_)});return Promise.race([S,v])}async unsubscribe(e,t,n){let r,s;typeof t=="function"?s=t:(r=t,s=n);const l=b();let u=[];if(s){const a=this._subscriptionNamesByHandler.get(s);if(!a)return{success:!1};u=[a],this._subscriptionNamesByHandler.delete(s)}else if(!this._subscriptionNamesBySubjectName.get(e))return{success:!1};for await(const a of u){this.off(a,s);const p={telemetrySdkVersion:w,applicationInstance:this._applicationInstance,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,name:e,data:r,responseName:l,unsubscribeName:a};window.parent.postMessage(p,"*");let c=!1,d;const S=new Promise((f,m)=>{const F=new Error(`${e} unsubscribe request with unsubscribe name of ${a} and response name of ${l} timed out after ${g}`);setTimeout(()=>{c=!0,this.off(l,d),m(F)},g)}),v=new Promise(f=>{d=m=>{c||f(m)},this.once(l,f)});if(!(await Promise.race([S,v])).success)return{success:!1}}return{success:!0}}on(e,t){var n;const r=(n=this._onHandlers.get(e))!==null&&n!==void 0?n:[];r.length===0&&this._onHandlers.set(e,r),r.push(t)}once(e,t){var n;const r=(n=this._onceHandlers.get(e))!==null&&n!==void 0?n:[];r.length===0&&this._onceHandlers.set(e,r),r.push(t)}off(e,t){const n=this._onHandlers.get(e),r=this._onceHandlers.get(e);if(!(!n&&!r)){if(n){for(let s=0;s<n.length;s+=1)t&&n[s]!==t||(n.splice(s,1),s-=1);n.length===0&&this._onHandlers.delete(e)}if(r){for(let s=0;s<r.length;s+=1)t&&r[s]!==t||(r.splice(s,1),s-=1);r.length===0&&this._onceHandlers.delete(e)}}}}function b(){return Math.random().toString(36).slice(2,9)}const w=k.version;let i=null;function R(){return i}function j(o){i=new C(o),i.bind()}function L(){i==null||i.unbind(),i=null}function U(...o){return h(i),i.on(...o)}function z(...o){return h(i),i.once(...o)}function V(...o){return h(i),i.off(...o)}function O(...o){return h(i),i.send(...o)}function G(...o){return h(i),i.request(...o)}function J(...o){return h(i),i.subscribe(...o)}function K(...o){return h(i),i.unsubscribe(...o)}function Q(){return h(i),i.store}function X(){return h(i),i.applications}function Y(){return h(i),i.media}function Z(){return h(i),i.accounts}function ee(){return h(i),i.users}function te(){return h(i),i.devices}function se(){return h(i),i.proxy}function ne(){return h(i),i.rootSettingsNavigation}function ie(){return h(i),i.weather}function h(o){if(!o)throw new Error("SDK is not configured")}exports.Accounts=H;exports.Applications=q;exports.Client=C;exports.Devices=A;exports.Environment=$;exports.Media=E;exports.Store=I;exports.Users=P;exports.Weather=M;exports.accounts=Z;exports.applications=X;exports.configure=j;exports.destroy=L;exports.devices=te;exports.globalClient=R;exports.media=Y;exports.off=V;exports.on=U;exports.once=z;exports.proxy=se;exports.request=G;exports.rootSettingsNavigation=ne;exports.send=O;exports.store=Q;exports.subscribe=J;exports.telemetrySdkVersion=w;exports.unsubscribe=K;exports.users=ee;exports.weather=ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-JDXm3DEz.cjs"),k="1.4.3",F={version:k};class H{constructor(e){this._client=e}async getCurrent(){const e=await this._client.request("accounts.getCurrent",{});if(!e.success)throw new Error("Failed to fetch current account");return e.account}}class q{constructor(e){this._client=e}async getAllByMountPoint(e){return(await this._client.request("applications.getAllByMountPoint",{mountPoint:e})).applications}async getByName(e){return(await this._client.request("applications.getByName",{name:e})).application}async setDependencies(e){return await this._client.request("applications.setDependencies",{applicationSpecifiers:e})}}class I{constructor(e){this._client=e}async getInformation(){const e=await this._client.request("devices.getInformation",{});if(!e.success)throw new Error("Failed to get device information");return e.deviceInformation}}function T(o,e=console.error){o().catch(e)}class ${constructor(e){this._client=e}async getColorScheme(){return(await this._client.request("environment.getColorScheme",{})).colorScheme}subscribeColorScheme(e){T(async()=>{this._client.on("environment.colorSchemeChanged",e),e(await this.getColorScheme())})}unsubscribeColorScheme(e){this._client.off("environment.colorSchemeChanged",e)}}class P{constructor(e){this._client=e}async getAllFolders(){return(await this._client.request("mediaFolders.getAll",{})).folders}async getAllByFolderId(e){return(await this._client.request("media.getAllByFolderId",{folderId:e})).contents}async getAllByTag(e){return(await this._client.request("media.getAllByTag",{tagName:e})).contents}async getById(e){return(await this._client.request("media.getById",{id:e})).content}}class E{constructor(e){this._client=e}get application(){return new y("application","",this._client)}get instance(){return new y("instance",this._client.applicationSpecifier,this._client)}get device(){return new y("device",this._client.applicationSpecifier,this._client)}shared(e){return new y("shared",e,this._client)}}class y{constructor(e,t,n){this._kind=e,this._namespace=t,this._client=n}async set(e,t){return(await this._client.request("store.set",{kind:this._kind,namespace:this._namespace,key:e,value:t})).success}async get(e){return(await this._client.request("store.get",{kind:this._kind,namespace:this._namespace,key:e})).value}async subscribe(e,t){return(await this._client.subscribe("store.subscribe",{kind:this._kind,namespace:this._namespace,key:e},t)).success}async unsubscribe(e,t){return(await this._client.unsubscribe("store.unsubscribe",{kind:this._kind,namespace:this._namespace,key:e},t)).success}async delete(e){return(await this._client.request("store.delete",{kind:this._kind,namespace:this._namespace,key:e})).success}}class M{constructor(e){this._client=e}async getCurrent(){const e=await this._client.request("users.getCurrent",{});if(!e.success)throw new Error("Failed to fetch current user");return e.user}}class A{constructor(e){this._client=e}async getConditions(e){const t=await this._client.request("weather.getConditions",e);if(!t.success||!t.conditions)throw new Error(t.error||"Failed to fetch weather conditions");return t.conditions}async getDailyForecast(e){const t=await this._client.request("weather.getDailyForecast",e);if(!t.success||!t.forecast)throw new Error(t.error||"Failed to fetch daily forecast");return t.forecast}async getHourlyForecast(e){const t=await this._client.request("weather.getHourlyForecast",e);if(!t.success||!t.forecast)throw new Error(t.error||"Failed to fetch hourly forecast");return t.forecast}}const x=N.z.object({name:N.z.string(),data:N.z.any()});class R{constructor(e){if(e._client._applicationSpecifier!=="rootSettingsNavigation")throw new Error("RootSettingsNavigation can only be used in the rootSettingsNavigation mount point");this._store=e}async setRootSettingsNavigation(e){const t=this._store.shared("root-settings-navigation"),n=await t.get("navigation"),r=this._store._client._applicationSpecifier;n[r]={applicationSpecifier:r,entries:e.entries},t.set("navigation",n)}async getRootSettingsNavigation(){const t=await this._store.shared("root-settings-navigation").get("navigation"),n=this._store._client._applicationSpecifier;return t[n]}async getAllRootSettingsNavigation(){return this._store.shared("root-settings-navigation").get("navigation")}}class j{constructor(e){this._client=e}async fetch(e,t){let n;typeof e=="string"?n=e:e instanceof URL?n=e.toString():(n=e.url,t||(t={method:e.method,headers:e.headers,body:e.body,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity}));let r={};t!=null&&t.headers&&(t.headers instanceof Headers?t.headers.forEach((h,c)=>{r[c]=h}):Array.isArray(t.headers)?t.headers.forEach(([h,c])=>{r[h]=c}):r=t.headers);const s=await this._client.request("proxy.fetch",{url:n,method:(t==null?void 0:t.method)||"GET",headers:r,body:(t==null?void 0:t.body)||null});if(!s.success)throw new Error(`Proxy fetch failed: ${s.statusText}`);const l=new Headers(s.headers),u={status:s.status,statusText:s.statusText,headers:l};let a=null;return s.body!==null&&s.body!==void 0&&(typeof s.body=="string"||s.body instanceof ArrayBuffer?a=s.body:typeof s.body=="object"&&(a=JSON.stringify(s.body))),new Response(a,u)}}const g=1e3*30;class B{constructor(e){this._applicationName=e,this._applicationInstance="",this._applicationSpecifier="",this._onHandlers=new Map,this._onceHandlers=new Map,this._subscriptionNamesByHandler=new Map,this._subscriptionNamesBySubjectName=new Map}get accounts(){return new H(this)}get users(){return new M(this)}get store(){return new E(this)}get applications(){return new q(this)}get media(){return new P(this)}get proxy(){return new j(this)}get devices(){return new I(this)}get rootSettingsNavigation(){return new R(this.store)}get weather(){return new A(this)}get applicationName(){return this._applicationName}get applicationSpecifier(){return this._applicationSpecifier}get applicationInstance(){return this._applicationInstance}bind(){var e;const t=new URL(window.location.href),n=t.searchParams;this._applicationInstance=(e=n.get("telemetryApplicationId"))!==null&&e!==void 0?e:"";const r=n.get("applicationSpecifier");if(r)this._applicationSpecifier=r;else{const s=t.hostname.split(".");this._applicationSpecifier=s[0]||""}if(!this._applicationSpecifier||this._applicationSpecifier.length!==40)throw new Error(`Invalid applicationSpecifier: expected 40-character hash, got "${this._applicationSpecifier}"`);if(!this._applicationInstance)throw new Error("Missing telemetryApplicationId query parameter");this._windowMessageHandler=s=>{if(s.source===window)return;for(let c=0;c<window.frames.length;c+=1)window.frames[c].postMessage(s.data,"*");const l=x.safeParse(s.data);if(!l.success)return;const u=l.data,a=this._onHandlers.get(u.name),h=this._onceHandlers.get(u.name);if(a)for(const c of a)c(u.data);if(h){for(const c of h)c(u.data);this._onceHandlers.delete(u.name)}},window.addEventListener("message",this._windowMessageHandler)}unbind(){this._windowMessageHandler&&window.removeEventListener("message",this._windowMessageHandler)}send(e,t){const n={telemetrySdkVersion:_,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t};window.parent.postMessage(n,"*")}request(e,t){const n=b(),r={telemetrySdkVersion:_,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t,responseName:n};window.parent.postMessage(r,"*");let s=!1,l;const u=new Promise((h,c)=>{const d=new Error(`${e} message request with response name of ${n} timed out after ${g}`);setTimeout(()=>{s=!0,this.off(n,l),c(d)},g)}),a=new Promise(h=>{l=c=>{s||h(c)},this.once(n,h)});return Promise.race([u,a])}async subscribe(e,t,n){let r,s;typeof t=="function"?s=t:(r=t,s=n);const l=b(),u=b();let a=this._subscriptionNamesBySubjectName.get(e);a||(a=[],this._subscriptionNamesBySubjectName.set(e,a)),a.push(l),this._subscriptionNamesByHandler.set(s,l),this.on(l,s);const h={telemetrySdkVersion:_,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:r,responseName:u,subscriptionName:l};window.parent.postMessage(h,"*");let c=!1,d;const S=new Promise((w,f)=>{const m=new Error(`${e} subscribe request with subscription name of ${l} and response name of ${u} timed out after ${g}`);setTimeout(()=>{c=!0,this.off(u,d),f(m)},g)}),v=new Promise(w=>{d=f=>{c||w(f)},this.on(u,w)});return Promise.race([S,v])}async unsubscribe(e,t,n){let r,s;typeof t=="function"?s=t:(r=t,s=n);const l=b();let u=[];if(s){const a=this._subscriptionNamesByHandler.get(s);if(!a)return{success:!1};u=[a],this._subscriptionNamesByHandler.delete(s)}else if(!this._subscriptionNamesBySubjectName.get(e))return{success:!1};for await(const a of u){this.off(a,s);const h={telemetrySdkVersion:_,applicationInstance:this._applicationInstance,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,name:e,data:r,responseName:l,unsubscribeName:a};window.parent.postMessage(h,"*");let c=!1,d;const S=new Promise((f,m)=>{const C=new Error(`${e} unsubscribe request with unsubscribe name of ${a} and response name of ${l} timed out after ${g}`);setTimeout(()=>{c=!0,this.off(l,d),m(C)},g)}),v=new Promise(f=>{d=m=>{c||f(m)},this.once(l,f)});if(!(await Promise.race([S,v])).success)return{success:!1}}return{success:!0}}on(e,t){var n;const r=(n=this._onHandlers.get(e))!==null&&n!==void 0?n:[];r.length===0&&this._onHandlers.set(e,r),r.push(t)}once(e,t){var n;const r=(n=this._onceHandlers.get(e))!==null&&n!==void 0?n:[];r.length===0&&this._onceHandlers.set(e,r),r.push(t)}off(e,t){const n=this._onHandlers.get(e),r=this._onceHandlers.get(e);if(!(!n&&!r)){if(n){for(let s=0;s<n.length;s+=1)t&&n[s]!==t||(n.splice(s,1),s-=1);n.length===0&&this._onHandlers.delete(e)}if(r){for(let s=0;s<r.length;s+=1)t&&r[s]!==t||(r.splice(s,1),s-=1);r.length===0&&this._onceHandlers.delete(e)}}}}function b(){return Math.random().toString(36).slice(2,9)}const _=F.version;let i=null;function D(){return i}function L(o){i=new B(o),i.bind()}function U(){i==null||i.unbind(),i=null}function z(...o){return p(i),i.on(...o)}function V(...o){return p(i),i.once(...o)}function O(...o){return p(i),i.off(...o)}function W(...o){return p(i),i.send(...o)}function G(...o){return p(i),i.request(...o)}function J(...o){return p(i),i.subscribe(...o)}function K(...o){return p(i),i.unsubscribe(...o)}function Q(){return p(i),i.store}function X(){return p(i),i.applications}function Y(){return p(i),i.media}function Z(){return p(i),i.accounts}function ee(){return p(i),i.users}function te(){return p(i),i.devices}function se(){return p(i),i.proxy}function ne(){return p(i),i.rootSettingsNavigation}function ie(){return p(i),i.weather}function p(o){if(!o)throw new Error("SDK is not configured")}exports.Accounts=H;exports.Applications=q;exports.Client=B;exports.Devices=I;exports.Environment=$;exports.Media=P;exports.Store=E;exports.Users=M;exports.Weather=A;exports.accounts=Z;exports.applications=X;exports.configure=L;exports.destroy=U;exports.devices=te;exports.globalClient=D;exports.media=Y;exports.off=O;exports.on=z;exports.once=V;exports.proxy=se;exports.request=G;exports.rootSettingsNavigation=ne;exports.send=W;exports.store=Q;exports.subscribe=J;exports.telemetrySdkVersion=_;exports.unsubscribe=K;exports.users=ee;exports.weather=ie;
package/dist/index.d.ts CHANGED
@@ -221,10 +221,10 @@ export declare function users(): import("./users.js").Users;
221
221
  */
222
222
  export declare function devices(): import("./device.js").Devices;
223
223
  /**
224
- * Provides access to the proxy API for fetching third-party content through the TelemetryOS proxy service.
224
+ * Provides access to the proxy API for fetching third-party content through the TelemetryOS API.
225
225
  *
226
- * This API allows applications to fetch content from external URLs through the platform's
227
- * proxy service, which handles authentication, caching, bandwidth quotas, and CORS issues.
226
+ * This API allows applications to fetch content from external URLs through the platform,
227
+ * which handles authentication, caching, bandwidth quotas, and CORS issues.
228
228
  * The proxy is useful for accessing external APIs or content that may have CORS restrictions.
229
229
  *
230
230
  * @returns The Proxy API object
@@ -254,8 +254,7 @@ export declare function rootSettingsNavigation(): import("./root-settings-naviga
254
254
  * Provides access to the weather API for retrieving weather information.
255
255
  *
256
256
  * This API allows applications to fetch current weather conditions and forecasts
257
- * for specified locations through the TelemetryOS platform's General Integrations Service.
258
- * It supports multiple weather providers including WeatherBit and AccuWeather.
257
+ * for specified locations through the TelemetryOS API.
259
258
  *
260
259
  * @returns The Weather API object
261
260
  * @throws {Error} If called before configure() or after destroy()
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { z as N } from "./index-B98VDFRY.js";
2
- const q = "1.4.1", A = {
2
+ const q = "1.4.3", I = {
3
3
  version: q
4
4
  };
5
- class E {
5
+ class P {
6
6
  constructor(e) {
7
7
  this._client = e;
8
8
  }
@@ -21,7 +21,7 @@ class E {
21
21
  return e.account;
22
22
  }
23
23
  }
24
- class I {
24
+ class E {
25
25
  constructor(e) {
26
26
  this._client = e;
27
27
  }
@@ -83,7 +83,7 @@ class I {
83
83
  });
84
84
  }
85
85
  }
86
- class P {
86
+ class M {
87
87
  constructor(e) {
88
88
  this._client = e;
89
89
  }
@@ -107,7 +107,7 @@ class P {
107
107
  return e.deviceInformation;
108
108
  }
109
109
  }
110
- function F(o, e = console.error) {
110
+ function A(o, e = console.error) {
111
111
  o().catch(e);
112
112
  }
113
113
  class D {
@@ -118,7 +118,7 @@ class D {
118
118
  return (await this._client.request("environment.getColorScheme", {})).colorScheme;
119
119
  }
120
120
  subscribeColorScheme(e) {
121
- F(async () => {
121
+ A(async () => {
122
122
  this._client.on("environment.colorSchemeChanged", e), e(await this.getColorScheme());
123
123
  });
124
124
  }
@@ -126,7 +126,7 @@ class D {
126
126
  this._client.off("environment.colorSchemeChanged", e);
127
127
  }
128
128
  }
129
- class M {
129
+ class B {
130
130
  constructor(e) {
131
131
  this._client = e;
132
132
  }
@@ -172,7 +172,7 @@ class M {
172
172
  })).content;
173
173
  }
174
174
  }
175
- class B {
175
+ class C {
176
176
  constructor(e) {
177
177
  this._client = e;
178
178
  }
@@ -186,7 +186,7 @@ class B {
186
186
  * @returns A StoreSlice instance for the application scope
187
187
  */
188
188
  get application() {
189
- return new _("application", "", this._client);
189
+ return new w("application", "", this._client);
190
190
  }
191
191
  /**
192
192
  * Provides access to the instance store scope.
@@ -200,7 +200,7 @@ class B {
200
200
  * @returns A StoreSlice instance for the instance scope
201
201
  */
202
202
  get instance() {
203
- return new _("instance", this._client.applicationSpecifier, this._client);
203
+ return new w("instance", this._client.applicationSpecifier, this._client);
204
204
  }
205
205
  /**
206
206
  * Provides access to the device store scope.
@@ -215,7 +215,7 @@ class B {
215
215
  * @returns A StoreSlice instance for the device scope
216
216
  */
217
217
  get device() {
218
- return new _("device", this._client.applicationSpecifier, this._client);
218
+ return new w("device", this._client.applicationSpecifier, this._client);
219
219
  }
220
220
  /**
221
221
  * Provides access to the shared store scope with a specified namespace.
@@ -231,10 +231,10 @@ class B {
231
231
  * @returns A StoreSlice instance for the specified shared namespace
232
232
  */
233
233
  shared(e) {
234
- return new _("shared", e, this._client);
234
+ return new w("shared", e, this._client);
235
235
  }
236
236
  }
237
- class _ {
237
+ class w {
238
238
  constructor(e, t, n) {
239
239
  this._kind = e, this._namespace = t, this._client = n;
240
240
  }
@@ -328,7 +328,7 @@ class _ {
328
328
  })).success;
329
329
  }
330
330
  }
331
- class C {
331
+ class F {
332
332
  constructor(e) {
333
333
  this._client = e;
334
334
  }
@@ -356,7 +356,7 @@ class k {
356
356
  this._client = e;
357
357
  }
358
358
  /**
359
- * Retrieves current weather conditions for a specified location using WeatherBit.
359
+ * Retrieves current weather conditions for a specified location.
360
360
  *
361
361
  * @param params - Weather request parameters including location and units
362
362
  * @returns A promise that resolves to the current weather conditions
@@ -381,7 +381,7 @@ class k {
381
381
  return t.conditions;
382
382
  }
383
383
  /**
384
- * Retrieves daily weather forecast for a specified location using WeatherBit.
384
+ * Retrieves daily weather forecast for a specified location.
385
385
  *
386
386
  * @param params - Forecast request parameters including location, units, and number of days
387
387
  * @returns A promise that resolves to an array of daily forecast data
@@ -404,7 +404,7 @@ class k {
404
404
  return t.forecast;
405
405
  }
406
406
  /**
407
- * Retrieves hourly weather forecast for a specified location using WeatherBit.
407
+ * Retrieves hourly weather forecast for a specified location.
408
408
  *
409
409
  * @param params - Forecast request parameters including location, units, and number of hours
410
410
  * @returns A promise that resolves to an array of hourly forecast data
@@ -426,69 +426,6 @@ class k {
426
426
  throw new Error(t.error || "Failed to fetch hourly forecast");
427
427
  return t.forecast;
428
428
  }
429
- /**
430
- * Retrieves current weather conditions using AccuWeather.
431
- *
432
- * @param params - Weather request parameters including location and units
433
- * @returns A promise that resolves to the AccuWeather conditions data
434
- * @throws {Error} If the request fails or location is invalid
435
- *
436
- * @example
437
- * ```typescript
438
- * const weather = await weather.getAccuWeatherConditions({
439
- * city: 'Paris',
440
- * units: 'metric'
441
- * })
442
- * ```
443
- */
444
- async getAccuWeatherConditions(e) {
445
- const t = await this._client.request("weather.getAccuWeatherConditions", e);
446
- if (!t.success || !t.data)
447
- throw new Error(t.error || "Failed to fetch AccuWeather conditions");
448
- return t.data;
449
- }
450
- /**
451
- * Retrieves daily forecast using AccuWeather.
452
- *
453
- * @param params - Forecast request parameters including location and units
454
- * @returns A promise that resolves to the AccuWeather daily forecast data
455
- * @throws {Error} If the request fails or location is invalid
456
- *
457
- * @example
458
- * ```typescript
459
- * const forecast = await weather.getAccuWeatherDailyForecast({
460
- * city: 'Sydney',
461
- * units: 'metric'
462
- * })
463
- * ```
464
- */
465
- async getAccuWeatherDailyForecast(e) {
466
- const t = await this._client.request("weather.getAccuWeatherDailyForecast", e);
467
- if (!t.success || !t.data)
468
- throw new Error(t.error || "Failed to fetch AccuWeather daily forecast");
469
- return t.data;
470
- }
471
- /**
472
- * Retrieves hourly forecast using AccuWeather.
473
- *
474
- * @param params - Forecast request parameters including location and units
475
- * @returns A promise that resolves to the AccuWeather hourly forecast data
476
- * @throws {Error} If the request fails or location is invalid
477
- *
478
- * @example
479
- * ```typescript
480
- * const forecast = await weather.getAccuWeatherHourlyForecast({
481
- * city: 'Berlin',
482
- * units: 'metric'
483
- * })
484
- * ```
485
- */
486
- async getAccuWeatherHourlyForecast(e) {
487
- const t = await this._client.request("weather.getAccuWeatherHourlyForecast", e);
488
- if (!t.success || !t.data)
489
- throw new Error(t.error || "Failed to fetch AccuWeather hourly forecast");
490
- return t.data;
491
- }
492
429
  }
493
430
  const T = N.object({
494
431
  name: N.string(),
@@ -565,10 +502,10 @@ class x {
565
502
  integrity: e.integrity
566
503
  }));
567
504
  let r = {};
568
- t != null && t.headers && (t.headers instanceof Headers ? t.headers.forEach((p, c) => {
569
- r[c] = p;
570
- }) : Array.isArray(t.headers) ? t.headers.forEach(([p, c]) => {
571
- r[p] = c;
505
+ t != null && t.headers && (t.headers instanceof Headers ? t.headers.forEach((h, c) => {
506
+ r[c] = h;
507
+ }) : Array.isArray(t.headers) ? t.headers.forEach(([h, c]) => {
508
+ r[h] = c;
572
509
  }) : r = t.headers);
573
510
  const s = await this._client.request("proxy.fetch", {
574
511
  url: n,
@@ -588,7 +525,7 @@ class x {
588
525
  }
589
526
  }
590
527
  const g = 1e3 * 30;
591
- class W {
528
+ class R {
592
529
  /**
593
530
  * Creates a new Client instance for communicating with the TelemetryOS platform.
594
531
  *
@@ -614,7 +551,7 @@ class W {
614
551
  * @returns An Accounts instance bound to this client
615
552
  */
616
553
  get accounts() {
617
- return new E(this);
554
+ return new P(this);
618
555
  }
619
556
  /**
620
557
  * Provides access to the users API for retrieving TelemetryOS user information.
@@ -628,7 +565,7 @@ class W {
628
565
  * @returns A Users instance bound to this client
629
566
  */
630
567
  get users() {
631
- return new C(this);
568
+ return new F(this);
632
569
  }
633
570
  /**
634
571
  * Provides access to the store API for data persistence with multiple storage scopes.
@@ -642,7 +579,7 @@ class W {
642
579
  * @returns A Store instance bound to this client
643
580
  */
644
581
  get store() {
645
- return new B(this);
582
+ return new C(this);
646
583
  }
647
584
  /**
648
585
  * Provides access to the applications API for discovering other TelemetryOS applications.
@@ -656,7 +593,7 @@ class W {
656
593
  * @returns An Applications instance bound to this client
657
594
  */
658
595
  get applications() {
659
- return new I(this);
596
+ return new E(this);
660
597
  }
661
598
  /**
662
599
  * Provides access to the media API for working with content hosted on the TelemetryOS platform.
@@ -671,13 +608,13 @@ class W {
671
608
  * @returns A Media instance bound to this client
672
609
  */
673
610
  get media() {
674
- return new M(this);
611
+ return new B(this);
675
612
  }
676
613
  /**
677
- * Provides access to the proxy API for fetching third-party content through the TelemetryOS proxy service.
614
+ * Provides access to the proxy API for fetching third-party content through the TelemetryOS API.
678
615
  *
679
616
  * This property returns a new Proxy instance that allows applications to fetch content from external
680
- * URLs through the platform's proxy service, which handles authentication, caching, and CORS issues.
617
+ * URLs through the platform, which handles authentication, caching, and CORS issues.
681
618
  *
682
619
  * NOTE: Most application developers should use the global proxy() function
683
620
  * instead of accessing this property directly.
@@ -700,7 +637,7 @@ class W {
700
637
  * @returns A Devices instance bound to this client
701
638
  */
702
639
  get devices() {
703
- return new P(this);
640
+ return new M(this);
704
641
  }
705
642
  /**
706
643
  * Provides access to the root settings navigation API for TelemetryOS administration UI integration.
@@ -724,8 +661,7 @@ class W {
724
661
  * Provides access to the weather API for retrieving weather data.
725
662
  *
726
663
  * This property returns a new Weather instance that allows applications to fetch
727
- * current weather conditions and forecasts from various providers (WeatherBit, AccuWeather)
728
- * through the General Integrations Service.
664
+ * current weather conditions and forecasts through the TelemetryOS API.
729
665
  *
730
666
  * NOTE: Most application developers should use the global weather() function
731
667
  * instead of accessing this property directly.
@@ -782,12 +718,12 @@ class W {
782
718
  const l = T.safeParse(s.data);
783
719
  if (!l.success)
784
720
  return;
785
- const u = l.data, a = this._onHandlers.get(u.name), p = this._onceHandlers.get(u.name);
721
+ const u = l.data, a = this._onHandlers.get(u.name), h = this._onceHandlers.get(u.name);
786
722
  if (a)
787
723
  for (const c of a)
788
724
  c(u.data);
789
- if (p) {
790
- for (const c of p)
725
+ if (h) {
726
+ for (const c of h)
791
727
  c(u.data);
792
728
  this._onceHandlers.delete(u.name);
793
729
  }
@@ -862,15 +798,15 @@ class W {
862
798
  };
863
799
  window.parent.postMessage(r, "*");
864
800
  let s = !1, l;
865
- const u = new Promise((p, c) => {
801
+ const u = new Promise((h, c) => {
866
802
  const d = new Error(`${e} message request with response name of ${n} timed out after ${g}`);
867
803
  setTimeout(() => {
868
804
  s = !0, this.off(n, l), c(d);
869
805
  }, g);
870
- }), a = new Promise((p) => {
806
+ }), a = new Promise((h) => {
871
807
  l = (c) => {
872
- s || p(c);
873
- }, this.once(n, p);
808
+ s || h(c);
809
+ }, this.once(n, h);
874
810
  });
875
811
  return Promise.race([u, a]);
876
812
  }
@@ -880,7 +816,7 @@ class W {
880
816
  const l = y(), u = y();
881
817
  let a = this._subscriptionNamesBySubjectName.get(e);
882
818
  a || (a = [], this._subscriptionNamesBySubjectName.set(e, a)), a.push(l), this._subscriptionNamesByHandler.set(s, l), this.on(l, s);
883
- const p = {
819
+ const h = {
884
820
  telemetrySdkVersion: b,
885
821
  applicationName: this._applicationName,
886
822
  applicationSpecifier: this._applicationSpecifier,
@@ -890,17 +826,17 @@ class W {
890
826
  responseName: u,
891
827
  subscriptionName: l
892
828
  };
893
- window.parent.postMessage(p, "*");
829
+ window.parent.postMessage(h, "*");
894
830
  let c = !1, d;
895
- const S = new Promise((w, f) => {
831
+ const S = new Promise((_, f) => {
896
832
  const m = new Error(`${e} subscribe request with subscription name of ${l} and response name of ${u} timed out after ${g}`);
897
833
  setTimeout(() => {
898
834
  c = !0, this.off(u, d), f(m);
899
835
  }, g);
900
- }), v = new Promise((w) => {
836
+ }), v = new Promise((_) => {
901
837
  d = (f) => {
902
- c || w(f);
903
- }, this.on(u, w);
838
+ c || _(f);
839
+ }, this.on(u, _);
904
840
  });
905
841
  return Promise.race([S, v]);
906
842
  }
@@ -918,7 +854,7 @@ class W {
918
854
  return { success: !1 };
919
855
  for await (const a of u) {
920
856
  this.off(a, s);
921
- const p = {
857
+ const h = {
922
858
  telemetrySdkVersion: b,
923
859
  applicationInstance: this._applicationInstance,
924
860
  applicationName: this._applicationName,
@@ -928,7 +864,7 @@ class W {
928
864
  responseName: l,
929
865
  unsubscribeName: a
930
866
  };
931
- window.parent.postMessage(p, "*");
867
+ window.parent.postMessage(h, "*");
932
868
  let c = !1, d;
933
869
  const S = new Promise((f, m) => {
934
870
  const H = new Error(`${e} unsubscribe request with unsubscribe name of ${a} and response name of ${l} timed out after ${g}`);
@@ -1020,95 +956,95 @@ class W {
1020
956
  function y() {
1021
957
  return Math.random().toString(36).slice(2, 9);
1022
958
  }
1023
- const b = A.version;
959
+ const b = I.version;
1024
960
  let i = null;
1025
- function j() {
961
+ function L() {
1026
962
  return i;
1027
963
  }
1028
- function L(o) {
1029
- i = new W(o), i.bind();
964
+ function U(o) {
965
+ i = new R(o), i.bind();
1030
966
  }
1031
- function U() {
967
+ function V() {
1032
968
  i == null || i.unbind(), i = null;
1033
969
  }
1034
- function V(...o) {
1035
- return h(i), i.on(...o);
1036
- }
1037
970
  function z(...o) {
1038
- return h(i), i.once(...o);
971
+ return p(i), i.on(...o);
1039
972
  }
1040
973
  function G(...o) {
1041
- return h(i), i.off(...o);
974
+ return p(i), i.once(...o);
1042
975
  }
1043
976
  function J(...o) {
1044
- return h(i), i.send(...o);
977
+ return p(i), i.off(...o);
1045
978
  }
1046
979
  function K(...o) {
1047
- return h(i), i.request(...o);
980
+ return p(i), i.send(...o);
1048
981
  }
1049
982
  function O(...o) {
1050
- return h(i), i.subscribe(...o);
983
+ return p(i), i.request(...o);
984
+ }
985
+ function W(...o) {
986
+ return p(i), i.subscribe(...o);
1051
987
  }
1052
988
  function Q(...o) {
1053
- return h(i), i.unsubscribe(...o);
989
+ return p(i), i.unsubscribe(...o);
1054
990
  }
1055
991
  function X() {
1056
- return h(i), i.store;
992
+ return p(i), i.store;
1057
993
  }
1058
994
  function Y() {
1059
- return h(i), i.applications;
995
+ return p(i), i.applications;
1060
996
  }
1061
997
  function Z() {
1062
- return h(i), i.media;
998
+ return p(i), i.media;
1063
999
  }
1064
1000
  function ee() {
1065
- return h(i), i.accounts;
1001
+ return p(i), i.accounts;
1066
1002
  }
1067
1003
  function te() {
1068
- return h(i), i.users;
1004
+ return p(i), i.users;
1069
1005
  }
1070
1006
  function se() {
1071
- return h(i), i.devices;
1007
+ return p(i), i.devices;
1072
1008
  }
1073
1009
  function ne() {
1074
- return h(i), i.proxy;
1010
+ return p(i), i.proxy;
1075
1011
  }
1076
1012
  function ie() {
1077
- return h(i), i.rootSettingsNavigation;
1013
+ return p(i), i.rootSettingsNavigation;
1078
1014
  }
1079
1015
  function re() {
1080
- return h(i), i.weather;
1016
+ return p(i), i.weather;
1081
1017
  }
1082
- function h(o) {
1018
+ function p(o) {
1083
1019
  if (!o)
1084
1020
  throw new Error("SDK is not configured");
1085
1021
  }
1086
1022
  export {
1087
- E as Accounts,
1088
- I as Applications,
1089
- W as Client,
1090
- P as Devices,
1023
+ P as Accounts,
1024
+ E as Applications,
1025
+ R as Client,
1026
+ M as Devices,
1091
1027
  D as Environment,
1092
- M as Media,
1093
- B as Store,
1094
- C as Users,
1028
+ B as Media,
1029
+ C as Store,
1030
+ F as Users,
1095
1031
  k as Weather,
1096
1032
  ee as accounts,
1097
1033
  Y as applications,
1098
- L as configure,
1099
- U as destroy,
1034
+ U as configure,
1035
+ V as destroy,
1100
1036
  se as devices,
1101
- j as globalClient,
1037
+ L as globalClient,
1102
1038
  Z as media,
1103
- G as off,
1104
- V as on,
1105
- z as once,
1039
+ J as off,
1040
+ z as on,
1041
+ G as once,
1106
1042
  ne as proxy,
1107
- K as request,
1043
+ O as request,
1108
1044
  ie as rootSettingsNavigation,
1109
- J as send,
1045
+ K as send,
1110
1046
  X as store,
1111
- O as subscribe,
1047
+ W as subscribe,
1112
1048
  b as telemetrySdkVersion,
1113
1049
  Q as unsubscribe,
1114
1050
  te as users,
package/dist/proxy.d.ts CHANGED
@@ -1,19 +1,19 @@
1
1
  import { Client } from './client.js';
2
2
  /**
3
- * Provides a proxy API for fetching third-party content through the TelemetryOS proxy service.
3
+ * Provides a proxy API for fetching third-party content through the TelemetryOS API.
4
4
  *
5
- * This API allows applications to fetch content from external URLs through the platform's
6
- * proxy service, which handles authentication, caching, bandwidth quotas, and CORS issues.
5
+ * This API allows applications to fetch content from external URLs through the platform,
6
+ * which handles authentication, caching, bandwidth quotas, and CORS issues.
7
7
  * The proxy is useful for accessing external APIs or content that may have CORS restrictions.
8
8
  */
9
9
  export declare class Proxy {
10
10
  _client: Client;
11
11
  constructor(client: Client);
12
12
  /**
13
- * Fetches content from an external URL through the TelemetryOS proxy service.
13
+ * Fetches content from an external URL through the TelemetryOS API.
14
14
  *
15
15
  * This method has the same interface as the native `fetch()` API but routes the request through
16
- * the platform's proxy service. This is useful for:
16
+ * the platform. This is useful for:
17
17
  * - Accessing external APIs that have CORS restrictions
18
18
  * - Fetching content with platform authentication
19
19
  * - Benefiting from platform caching and bandwidth management
package/dist/weather.d.ts CHANGED
@@ -99,16 +99,15 @@ export type HourlyForecastParams = WeatherRequestParams & {
99
99
  hours?: number;
100
100
  };
101
101
  /**
102
- * Weather API for retrieving weather data from various providers
102
+ * Weather API for retrieving weather data
103
103
  *
104
- * Provides access to current conditions and forecasts from WeatherBit
105
- * and AccuWeather through the General Integrations Service.
104
+ * Provides access to current conditions and forecasts through the TelemetryOS API.
106
105
  */
107
106
  export declare class Weather {
108
107
  _client: Client;
109
108
  constructor(client: Client);
110
109
  /**
111
- * Retrieves current weather conditions for a specified location using WeatherBit.
110
+ * Retrieves current weather conditions for a specified location.
112
111
  *
113
112
  * @param params - Weather request parameters including location and units
114
113
  * @returns A promise that resolves to the current weather conditions
@@ -128,7 +127,7 @@ export declare class Weather {
128
127
  */
129
128
  getConditions(params: WeatherRequestParams): Promise<WeatherConditions>;
130
129
  /**
131
- * Retrieves daily weather forecast for a specified location using WeatherBit.
130
+ * Retrieves daily weather forecast for a specified location.
132
131
  *
133
132
  * @param params - Forecast request parameters including location, units, and number of days
134
133
  * @returns A promise that resolves to an array of daily forecast data
@@ -146,7 +145,7 @@ export declare class Weather {
146
145
  */
147
146
  getDailyForecast(params: DailyForecastParams): Promise<WeatherForecast[]>;
148
147
  /**
149
- * Retrieves hourly weather forecast for a specified location using WeatherBit.
148
+ * Retrieves hourly weather forecast for a specified location.
150
149
  *
151
150
  * @param params - Forecast request parameters including location, units, and number of hours
152
151
  * @returns A promise that resolves to an array of hourly forecast data
@@ -163,52 +162,4 @@ export declare class Weather {
163
162
  * ```
164
163
  */
165
164
  getHourlyForecast(params: HourlyForecastParams): Promise<WeatherForecast[]>;
166
- /**
167
- * Retrieves current weather conditions using AccuWeather.
168
- *
169
- * @param params - Weather request parameters including location and units
170
- * @returns A promise that resolves to the AccuWeather conditions data
171
- * @throws {Error} If the request fails or location is invalid
172
- *
173
- * @example
174
- * ```typescript
175
- * const weather = await weather.getAccuWeatherConditions({
176
- * city: 'Paris',
177
- * units: 'metric'
178
- * })
179
- * ```
180
- */
181
- getAccuWeatherConditions(params: WeatherRequestParams): Promise<Record<string, any>>;
182
- /**
183
- * Retrieves daily forecast using AccuWeather.
184
- *
185
- * @param params - Forecast request parameters including location and units
186
- * @returns A promise that resolves to the AccuWeather daily forecast data
187
- * @throws {Error} If the request fails or location is invalid
188
- *
189
- * @example
190
- * ```typescript
191
- * const forecast = await weather.getAccuWeatherDailyForecast({
192
- * city: 'Sydney',
193
- * units: 'metric'
194
- * })
195
- * ```
196
- */
197
- getAccuWeatherDailyForecast(params: WeatherRequestParams): Promise<Record<string, any>>;
198
- /**
199
- * Retrieves hourly forecast using AccuWeather.
200
- *
201
- * @param params - Forecast request parameters including location and units
202
- * @returns A promise that resolves to the AccuWeather hourly forecast data
203
- * @throws {Error} If the request fails or location is invalid
204
- *
205
- * @example
206
- * ```typescript
207
- * const forecast = await weather.getAccuWeatherHourlyForecast({
208
- * city: 'Berlin',
209
- * units: 'metric'
210
- * })
211
- * ```
212
- */
213
- getAccuWeatherHourlyForecast(params: WeatherRequestParams): Promise<Record<string, any>>;
214
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telemetryos/root-sdk",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "The official TelemetryOS root application sdk package. Provides types and apis for building root TelemetryOS applications.",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",