@kohost/api-client 4.0.8 → 4.0.9

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 (49) hide show
  1. package/dist/chunk-36WNTEIW.js +1 -1
  2. package/dist/chunk-EBJTC6MA.js +1 -1
  3. package/dist/chunk-HKJ2B2AA.js +1 -1
  4. package/dist/chunk-IJQVACF3.js +1 -0
  5. package/dist/{chunk-3ZUKHDXQ.js.map → chunk-IJQVACF3.js.map} +1 -1
  6. package/dist/chunk-KNSZIQXT.js +1 -1
  7. package/dist/chunk-W2G36LNI.js +1 -1
  8. package/dist/chunk-XZITDYVM.js +1 -0
  9. package/dist/chunk-XZITDYVM.js.map +1 -0
  10. package/dist/client.cjs +1 -1
  11. package/dist/client.js +1 -1
  12. package/dist/commands.cjs +1 -1
  13. package/dist/commands.cjs.map +1 -1
  14. package/dist/commands.js +1 -1
  15. package/dist/defs.cjs +1 -1
  16. package/dist/defs.js +1 -1
  17. package/dist/errors.cjs +1 -1
  18. package/dist/errors.cjs.map +1 -1
  19. package/dist/errors.js +1 -1
  20. package/dist/events.cjs +1 -1
  21. package/dist/events.cjs.map +1 -1
  22. package/dist/events.js +1 -1
  23. package/dist/index.cjs +1185 -1060
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +138 -123
  26. package/dist/index.d.ts +138 -123
  27. package/dist/index.js +1185 -1060
  28. package/dist/index.js.map +1 -1
  29. package/dist/models.cjs +1 -1
  30. package/dist/models.cjs.map +1 -1
  31. package/dist/models.d.cts +3 -3
  32. package/dist/models.d.ts +3 -3
  33. package/dist/models.js +1 -1
  34. package/dist/socketIoClient.cjs +1 -1
  35. package/dist/socketIoClient.js +1 -1
  36. package/dist/useCases.cjs +1 -1
  37. package/dist/useCases.cjs.map +1 -1
  38. package/dist/useCases.js +1 -1
  39. package/dist/utils.cjs +1 -1
  40. package/dist/utils.cjs.map +1 -1
  41. package/dist/utils.d.cts +1 -1
  42. package/dist/utils.d.ts +1 -1
  43. package/dist/utils.js +1 -1
  44. package/dist/{windowCovering-dE1qeU57.d.cts → windowCovering-CXcSOjuy.d.cts} +137 -122
  45. package/dist/{windowCovering-dE1qeU57.d.ts → windowCovering-CXcSOjuy.d.ts} +137 -122
  46. package/package.json +1 -1
  47. package/dist/chunk-36O34ETI.js +0 -1
  48. package/dist/chunk-36O34ETI.js.map +0 -1
  49. package/dist/chunk-3ZUKHDXQ.js +0 -1
package/dist/models.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { x as Entity } from './windowCovering-dE1qeU57.cjs';
2
- export { A as Alarm, a as Announcement, C as Camera, b as Category, c as Courtesy, d as Credential, D as DeviceRouter, e as Dimmer, f as DiscoveredDevice, E as EmailMessage, g as EnergyReport, h as EnergyReportShard, G as Gateway, I as Identification, i as Issue, L as Lock, j as Log, M as MediaFile, k as MediaSource, l as MotionSensor, O as Order, m as Organization, P as Policy, n as Product, o as Property, R as Reservation, p as Room, S as Scene, q as ShortLink, r as SmsMessage, s as Space, t as Switch, u as SystemUser, T as Thermostat, v as Ticket, w as TimeSheet, U as User, V as Vendor, W as WindowCovering } from './windowCovering-dE1qeU57.cjs';
1
+ import { x as Entity } from './windowCovering-CXcSOjuy.cjs';
2
+ export { A as Alarm, a as Announcement, C as Camera, b as Category, c as Courtesy, d as Credential, D as DeviceRouter, e as Dimmer, f as DiscoveredDevice, E as EmailMessage, g as EnergyReport, h as EnergyReportShard, G as Gateway, I as Identification, i as Issue, L as Lock, j as Log, M as MediaFile, k as MediaSource, l as MotionSensor, O as Order, m as Organization, P as Policy, n as Product, o as Property, R as Reservation, p as Room, S as Scene, q as ShortLink, r as SmsMessage, s as Space, t as Switch, u as SystemUser, T as Thermostat, v as Ticket, w as TimeSheet, U as User, V as Vendor, W as WindowCovering } from './windowCovering-CXcSOjuy.cjs';
3
3
 
4
4
  declare class Payment extends Entity {
5
5
  /**
@@ -37,7 +37,7 @@ declare class Payment extends Entity {
37
37
  systemId?: string | undefined;
38
38
  });
39
39
  id: string | undefined;
40
- type: "visa" | "amex" | "masterCard" | "maestro" | "discover" | "diners" | "jcb" | "applePay" | "alipay" | "chinaUnionPay" | "vpay";
40
+ type: "visa" | "amex" | "masterCard" | "maestro" | "discover" | "diners" | "jcb" | "applePay" | "alipay" | "chinaUnionPay" | "vpay" | undefined;
41
41
  enabled: boolean | undefined;
42
42
  storageData: string | undefined;
43
43
  maskedNumber: any;
package/dist/models.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { x as Entity } from './windowCovering-dE1qeU57.js';
2
- export { A as Alarm, a as Announcement, C as Camera, b as Category, c as Courtesy, d as Credential, D as DeviceRouter, e as Dimmer, f as DiscoveredDevice, E as EmailMessage, g as EnergyReport, h as EnergyReportShard, G as Gateway, I as Identification, i as Issue, L as Lock, j as Log, M as MediaFile, k as MediaSource, l as MotionSensor, O as Order, m as Organization, P as Policy, n as Product, o as Property, R as Reservation, p as Room, S as Scene, q as ShortLink, r as SmsMessage, s as Space, t as Switch, u as SystemUser, T as Thermostat, v as Ticket, w as TimeSheet, U as User, V as Vendor, W as WindowCovering } from './windowCovering-dE1qeU57.js';
1
+ import { x as Entity } from './windowCovering-CXcSOjuy.js';
2
+ export { A as Alarm, a as Announcement, C as Camera, b as Category, c as Courtesy, d as Credential, D as DeviceRouter, e as Dimmer, f as DiscoveredDevice, E as EmailMessage, g as EnergyReport, h as EnergyReportShard, G as Gateway, I as Identification, i as Issue, L as Lock, j as Log, M as MediaFile, k as MediaSource, l as MotionSensor, O as Order, m as Organization, P as Policy, n as Product, o as Property, R as Reservation, p as Room, S as Scene, q as ShortLink, r as SmsMessage, s as Space, t as Switch, u as SystemUser, T as Thermostat, v as Ticket, w as TimeSheet, U as User, V as Vendor, W as WindowCovering } from './windowCovering-CXcSOjuy.js';
3
3
 
4
4
  declare class Payment extends Entity {
5
5
  /**
@@ -37,7 +37,7 @@ declare class Payment extends Entity {
37
37
  systemId?: string | undefined;
38
38
  });
39
39
  id: string | undefined;
40
- type: "visa" | "amex" | "masterCard" | "maestro" | "discover" | "diners" | "jcb" | "applePay" | "alipay" | "chinaUnionPay" | "vpay";
40
+ type: "visa" | "amex" | "masterCard" | "maestro" | "discover" | "diners" | "jcb" | "applePay" | "alipay" | "chinaUnionPay" | "vpay" | undefined;
41
41
  enabled: boolean | undefined;
42
42
  storageData: string | undefined;
43
43
  maskedNumber: any;
package/dist/models.js CHANGED
@@ -1 +1 @@
1
- import{Alarm as o,Announcement as r,Camera as m,Category as p,Courtesy as t,Credential as c,DeviceRouter as h,Dimmer as i,DiscoveredDevice as j,EmailMessage as k,EnergyReport as n,EnergyReportShard as s,Entity as u,Gateway as A,Identification as B,Issue as E,Lock as J,Log as T,MediaFile as e,MediaSource as f,MotionSensor as x,Order as C,Organization as H,Payment as I,Policy as K,Product as M,Property as O,Reservation as a,Room as b,Scene as d,ShortLink as g,SmsMessage as l,Space as q,Switch as v,SystemUser as w,Thermostat as y,Ticket as z,TimeSheet as D,User as F,Vendor as G,WindowCovering as L}from"./chunk-36O34ETI.js";import"./chunk-EBJTC6MA.js";import"./chunk-HKJ2B2AA.js";export{o as Alarm,r as Announcement,m as Camera,p as Category,t as Courtesy,c as Credential,h as DeviceRouter,i as Dimmer,j as DiscoveredDevice,k as EmailMessage,n as EnergyReport,s as EnergyReportShard,u as Entity,A as Gateway,B as Identification,E as Issue,J as Lock,T as Log,e as MediaFile,f as MediaSource,x as MotionSensor,C as Order,H as Organization,I as Payment,K as Policy,M as Product,O as Property,a as Reservation,b as Room,d as Scene,g as ShortLink,l as SmsMessage,q as Space,v as Switch,w as SystemUser,y as Thermostat,z as Ticket,D as TimeSheet,F as User,G as Vendor,L as WindowCovering};//# sourceMappingURL=models.js.map
1
+ import{Alarm,Announcement,Camera,Category,Courtesy,Credential,DeviceRouter,Dimmer,DiscoveredDevice,EmailMessage,EnergyReport,EnergyReportShard,Entity,Gateway,Identification,Issue,Lock,Log,MediaFile,MediaSource,MotionSensor,Order,Organization,Payment,Policy,Product,Property,Reservation,Room,Scene,ShortLink,SmsMessage,Space,Switch,SystemUser,Thermostat,Ticket,TimeSheet,User,Vendor,WindowCovering}from"./chunk-XZITDYVM.js";import"./chunk-EBJTC6MA.js";import"./chunk-HKJ2B2AA.js";export{Alarm,Announcement,Camera,Category,Courtesy,Credential,DeviceRouter,Dimmer,DiscoveredDevice,EmailMessage,EnergyReport,EnergyReportShard,Entity,Gateway,Identification,Issue,Lock,Log,MediaFile,MediaSource,MotionSensor,Order,Organization,Payment,Policy,Product,Property,Reservation,Room,Scene,ShortLink,SmsMessage,Space,Switch,SystemUser,Thermostat,Ticket,TimeSheet,User,Vendor,WindowCovering};//# sourceMappingURL=models.js.map
@@ -1 +1 @@
1
- var t,e=Object.defineProperty,s=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,n={};((t,s)=>{for(var o in s)e(t,o,{get:s[o],enumerable:!0})})(n,{KohostSocketIoClient:()=>i}),module.exports=(t=n,((t,n,r,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let l of o(n))c.call(t,l)||l===r||e(t,l,{get:()=>n[l],enumerable:!(i=s(n,l))||i.enumerable});return t})(e({},"__esModule",{value:!0}),t));var r=require("socket.io-client"),i=class{constructor(t={url:null,options:{}}){if(!t.url)throw new Error("config.url is required");this.url=t.url,this.options={autoConnect:!1,forceNew:!1,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,withCredentials:!0,transports:["websocket","polling"],upgrade:!0,...t.options},this.socket=(0,r.io)(this.url,this.options),this.socket.on("connect",(()=>{this.emit("connect",this.socket)})),this.socket.on("disconnect",(t=>{this.emit("disconnect",t)})),this.socket.on("reconnect_attempt",(t=>{this.emit("reconnect_attempt",t)})),this.socket.on("connect_error",(t=>{this.emit("connect_error",t)})),this.callbacks={}}#t=null;get url(){return this.#t}set url(t){this.#t=t}get connected(){return this.socket?.connected||!1}get disconnected(){return this.socket?.disconnected||!1}on(t,e){if("function"!=typeof e)throw new Error("Callback must be a function");this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e)}emit(t,...e){this.callbacks[t]&&this.callbacks[t].forEach((t=>t(...e)))}listeners(t){return this.callbacks[t]||[]}connect(){this.socket.connect()}disconnect(){this.socket.disconnect()}reconnect(){this.disconnect(),this.connect()}subscribe(t,e){this.socket.on(t,e)}unsubscribe(t,e){this.socket.off(t,e)}getSubscriptions(t){return this.socket.listeners(t)}send(t,{data:e={},query:s={},...o}){this.socket.emit(t,{data:e,query:s,...o})}destroy(){this.disconnect(),this.socket.removeAllListeners(),this.socket=null}};//# sourceMappingURL=socketIoClient.cjs.map
1
+ var mod,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,socketIoClient_exports={};((target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})})(socketIoClient_exports,{KohostSocketIoClient:()=>KohostSocketIoClient}),module.exports=(mod=socketIoClient_exports,((to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to})(__defProp({},"__esModule",{value:!0}),mod));var import_socket=require("socket.io-client"),KohostSocketIoClient=class{constructor(config={url:null,options:{}}){if(!config.url)throw new Error("config.url is required");this.url=config.url,this.options={autoConnect:!1,forceNew:!1,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,withCredentials:!0,transports:["websocket","polling"],upgrade:!0,...config.options},this.socket=(0,import_socket.io)(this.url,this.options),this.socket.on("connect",(()=>{this.emit("connect",this.socket)})),this.socket.on("disconnect",(reason=>{this.emit("disconnect",reason)})),this.socket.on("reconnect_attempt",(data=>{this.emit("reconnect_attempt",data)})),this.socket.on("connect_error",(error=>{this.emit("connect_error",error)})),this.callbacks={}}#url=null;get url(){return this.#url}set url(url){this.#url=url}get connected(){return this.socket?.connected||!1}get disconnected(){return this.socket?.disconnected||!1}on(event,callback){if("function"!=typeof callback)throw new Error("Callback must be a function");this.callbacks[event]||(this.callbacks[event]=[]),this.callbacks[event].push(callback)}emit(event,...args){this.callbacks[event]&&this.callbacks[event].forEach((callback=>callback(...args)))}listeners(event){return this.callbacks[event]||[]}connect(){this.socket.connect()}disconnect(){this.socket.disconnect()}reconnect(){this.disconnect(),this.connect()}subscribe(event,callback){this.socket.on(event,callback)}unsubscribe(event,callback){this.socket.off(event,callback)}getSubscriptions(event){return this.socket.listeners(event)}send(event,{data:data={},query:query={},...rest}){this.socket.emit(event,{data:data,query:query,...rest})}destroy(){this.disconnect(),this.socket.removeAllListeners(),this.socket=null}};//# sourceMappingURL=socketIoClient.cjs.map
@@ -1 +1 @@
1
- import"./chunk-HKJ2B2AA.js";import{io as t}from"socket.io-client";var e=class{constructor(e={url:null,options:{}}){if(!e.url)throw new Error("config.url is required");this.url=e.url,this.options={autoConnect:!1,forceNew:!1,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,withCredentials:!0,transports:["websocket","polling"],upgrade:!0,...e.options},this.socket=t(this.url,this.options),this.socket.on("connect",(()=>{this.emit("connect",this.socket)})),this.socket.on("disconnect",(t=>{this.emit("disconnect",t)})),this.socket.on("reconnect_attempt",(t=>{this.emit("reconnect_attempt",t)})),this.socket.on("connect_error",(t=>{this.emit("connect_error",t)})),this.callbacks={}}#t=null;get url(){return this.#t}set url(t){this.#t=t}get connected(){return this.socket?.connected||!1}get disconnected(){return this.socket?.disconnected||!1}on(t,e){if("function"!=typeof e)throw new Error("Callback must be a function");this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e)}emit(t,...e){this.callbacks[t]&&this.callbacks[t].forEach((t=>t(...e)))}listeners(t){return this.callbacks[t]||[]}connect(){this.socket.connect()}disconnect(){this.socket.disconnect()}reconnect(){this.disconnect(),this.connect()}subscribe(t,e){this.socket.on(t,e)}unsubscribe(t,e){this.socket.off(t,e)}getSubscriptions(t){return this.socket.listeners(t)}send(t,{data:e={},query:s={},...c}){this.socket.emit(t,{data:e,query:s,...c})}destroy(){this.disconnect(),this.socket.removeAllListeners(),this.socket=null}};export{e as KohostSocketIoClient};//# sourceMappingURL=socketIoClient.js.map
1
+ import"./chunk-HKJ2B2AA.js";import{io}from"socket.io-client";var KohostSocketIoClient=class{constructor(config={url:null,options:{}}){if(!config.url)throw new Error("config.url is required");this.url=config.url,this.options={autoConnect:!1,forceNew:!1,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,withCredentials:!0,transports:["websocket","polling"],upgrade:!0,...config.options},this.socket=io(this.url,this.options),this.socket.on("connect",(()=>{this.emit("connect",this.socket)})),this.socket.on("disconnect",(reason=>{this.emit("disconnect",reason)})),this.socket.on("reconnect_attempt",(data=>{this.emit("reconnect_attempt",data)})),this.socket.on("connect_error",(error=>{this.emit("connect_error",error)})),this.callbacks={}}#url=null;get url(){return this.#url}set url(url){this.#url=url}get connected(){return this.socket?.connected||!1}get disconnected(){return this.socket?.disconnected||!1}on(event,callback){if("function"!=typeof callback)throw new Error("Callback must be a function");this.callbacks[event]||(this.callbacks[event]=[]),this.callbacks[event].push(callback)}emit(event,...args){this.callbacks[event]&&this.callbacks[event].forEach((callback=>callback(...args)))}listeners(event){return this.callbacks[event]||[]}connect(){this.socket.connect()}disconnect(){this.socket.disconnect()}reconnect(){this.disconnect(),this.connect()}subscribe(event,callback){this.socket.on(event,callback)}unsubscribe(event,callback){this.socket.off(event,callback)}getSubscriptions(event){return this.socket.listeners(event)}send(event,{data:data={},query:query={},...rest}){this.socket.emit(event,{data:data,query:query,...rest})}destroy(){this.disconnect(),this.socket.removeAllListeners(),this.socket=null}};export{KohostSocketIoClient};//# sourceMappingURL=socketIoClient.js.map